diff --git a/app/main.py b/app/main.py index 0342502..dcef595 100644 --- a/app/main.py +++ b/app/main.py @@ -12,10 +12,14 @@ version="1.0.0" ) -# Add CORS middleware +# CORS setup +origins = [ + "https://bubblesort.vercel.com" # Add your deployed frontend URL here +] + app.add_middleware( CORSMiddleware, - allow_origins=["*"], # Configure this properly for production + allow_origins=origins, # You can use ["*"] for all origins (not recommended for production) allow_credentials=True, allow_methods=["*"], allow_headers=["*"], @@ -51,4 +55,4 @@ async def root(): "auth": "/auth", "protected": "/protected" } - } \ No newline at end of file + }