-
Notifications
You must be signed in to change notification settings - Fork 4
Update main.py #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,15 +12,6 @@ | |
| version="1.0.0" | ||
arvi18 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security Improvement: While replacing the wildcard CORS origin with a specific domain is a good security improvement, hardcoding the frontend URL ( origins = os.getenv('ALLOWED_ORIGINS', 'https://bubblesort.vercel.com').split(',')This would allow for different frontend URLs across environments without code changes. |
||
| ) | ||
|
|
||
| # Add CORS middleware | ||
| app.add_middleware( | ||
| CORSMiddleware, | ||
| allow_origins=["*"], # Configure this properly for production | ||
| allow_credentials=True, | ||
| allow_methods=["*"], | ||
| allow_headers=["*"], | ||
| ) | ||
|
|
||
| # Include authentication routes | ||
| app.include_router(auth_router) | ||
|
|
||
|
|
@@ -51,4 +42,4 @@ async def root(): | |
| "auth": "/auth", | ||
arvi18 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "protected": "/protected" | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.