TalatMasood commited on
Commit
e36537f
·
1 Parent(s): 23871f0

Updating with CORS

Browse files
Files changed (1) hide show
  1. src/main.py +3 -5
src/main.py CHANGED
@@ -61,11 +61,9 @@ app = FastAPI(title="Chatbot API")
61
 
62
  app.add_middleware(
63
  CORSMiddleware,
64
- # allow_origins=["http://localhost:8080",
65
- # "http://localhost:3000", "https://talatmasud-chatbot-frontend.static.hf.space", "https://chatbot-react-frontend.onrender.com", "https://chatbot.neurovise.ai"], # Add both ports
66
- # allow_credentials=True,
67
- allow_origins=["*"], # Wildcard for testing
68
- allow_credentials=False, # Must be False with wildcard
69
  allow_methods=["*"], # Allows all methods
70
  allow_headers=["*"], # Allows all headers
71
  )
 
61
 
62
  app.add_middleware(
63
  CORSMiddleware,
64
+ allow_origins=["http://localhost:8080",
65
+ "http://localhost:3000", "https://talatmasud-chatbot-frontend.static.hf.space", "https://chatbot.neurovise.ai"], # Add both ports
66
+ allow_credentials=True,
 
 
67
  allow_methods=["*"], # Allows all methods
68
  allow_headers=["*"], # Allows all headers
69
  )