sonuprasad23 commited on
Commit
aa34e82
·
1 Parent(s): f597c94

Fixed some bugs

Browse files
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -1,4 +1,5 @@
1
  from fastapi import FastAPI, HTTPException, Query
 
2
  from fastapi.responses import HTMLResponse
3
  from pydantic import BaseModel
4
  import requests
@@ -19,7 +20,13 @@ app = FastAPI(
19
  )
20
 
21
  origins = ["*"]
22
- app.add_middleware(CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"])
 
 
 
 
 
 
23
 
24
  FLIGHT_API_KEY = os.getenv("FLIGHT_API_KEY")
25
  GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
 
1
  from fastapi import FastAPI, HTTPException, Query
2
+ from fastapi.middleware.cors import CORSMiddleware
3
  from fastapi.responses import HTMLResponse
4
  from pydantic import BaseModel
5
  import requests
 
20
  )
21
 
22
  origins = ["*"]
23
+ app.add_middleware(
24
+ CORSMiddleware,
25
+ allow_origins=origins,
26
+ allow_credentials=True,
27
+ allow_methods=["*"],
28
+ allow_headers=["*"],
29
+ )
30
 
31
  FLIGHT_API_KEY = os.getenv("FLIGHT_API_KEY")
32
  GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")