Skip to content

Commit

Permalink
Merge pull request #43 from w1tnessbtwwwww/backend
Browse files Browse the repository at this point in the history
Backend
  • Loading branch information
w1tnessbtwwwww authored Dec 15, 2024
2 parents 2de686d + 04d745c commit 38b0033
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SpeedSolverBackend/SpeedSolverAPI/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ POSTGRES_DB=
API_BASE_PORT=

JWT_SECRET_KEY=
JWT_EXPIRES_AT=
JWT_ACCESS_TOKEN_LIFETIME_MINUTES=
JWT_REFRESH_TOKEN_LIFETIME_HOURS=
JWT_ALGORITHM=
5 changes: 4 additions & 1 deletion SpeedSolverBackend/SpeedSolverAPI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

api.add_middleware (
CORSMiddleware,
allow_origins=["*"],
allow_origins=[
"https://speedsolver.ru"
"http://speedsolver.ru"
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const AccessPage: React.FC<AuthTypeProp> = ({ action }) => {
}

try {
var response = await axios.post(`${API_URL()}/access/authorize`, data, { headers: headers })
var response = await axios.post(`${API_URL()}/access/authorize`, data, { headers: headers, withCredentials: true })
return response
}
catch(error) {
Expand Down

0 comments on commit 38b0033

Please sign in to comment.