Skip to content

Commit

Permalink
remaked origins in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
w1tnessbtwwwww committed Dec 15, 2024
1 parent 0b746ed commit 04d745c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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 04d745c

Please sign in to comment.