Skip to content

Commit 711ec15

Browse files
committed
Fix CORS preflight 405 error
1 parent f6ed8e9 commit 711ec15

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/backend/app/routes/auth.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ class AuthResponse(BaseModel):
3030
user: dict
3131

3232

33+
@router.options("/google")
34+
async def google_auth_options():
35+
"""
36+
Handle OPTIONS request for Google Auth
37+
"""
38+
return {}
39+
3340
@router.post("/google", response_model=AuthResponse)
3441
async def google_auth(request: GoogleAuthRequest):
3542
"""

0 commit comments

Comments
 (0)