ADKU commited on
Commit
a8eddfb
·
verified ·
1 Parent(s): 2dfb98f

updated with cors

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,12 +11,12 @@ from fastapi.middleware.cors import CORSMiddleware
11
 
12
  app = FastAPI()
13
 
14
- # CORS Middleware to allow frontend to access API
15
  app.add_middleware(
16
  CORSMiddleware,
17
- allow_origins=["*"], # Allow all origins (React App)
18
- allow_methods=["*"],
19
- allow_headers=["*"],
20
  )
21
 
22
  # ✅ Configure Gemini API
 
11
 
12
  app = FastAPI()
13
 
14
+ # CORS Middleware Configuration
15
  app.add_middleware(
16
  CORSMiddleware,
17
+ allow_origins=["*"], # Allow all origins (Frontend to Backend Communication)
18
+ allow_methods=["*"], # Allow all HTTP methods (GET, POST, etc.)
19
+ allow_headers=["*"], # Allow all headers
20
  )
21
 
22
  # ✅ Configure Gemini API