Jaykay73 commited on
Commit
5f974b1
·
unverified ·
1 Parent(s): b42b068

Restrict CORS to specific frontend domain

Browse files

Updated CORS settings to allow requests from the specified frontend domain.

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ app = FastAPI(
19
  # Enable CORS (Allows your frontend to talk to this API)
20
  app.add_middleware(
21
  CORSMiddleware,
22
- allow_origins=["*"], # In production, replace with specific domain
23
  allow_credentials=True,
24
  allow_methods=["*"],
25
  allow_headers=["*"],
@@ -174,4 +174,4 @@ def trigger_update(background_tasks: BackgroundTasks):
174
 
175
  # --- Entry Point ---
176
  if __name__ == "__main__":
177
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
19
  # Enable CORS (Allows your frontend to talk to this API)
20
  app.add_middleware(
21
  CORSMiddleware,
22
+ allow_origins=["https://aether-match.vercel.app"], # In production, replace with specific domain
23
  allow_credentials=True,
24
  allow_methods=["*"],
25
  allow_headers=["*"],
 
174
 
175
  # --- Entry Point ---
176
  if __name__ == "__main__":
177
+ uvicorn.run(app, host="0.0.0.0", port=8000)