Spaces:
Running
Running
Commit ·
23871f0
1
Parent(s): 6c372c4
debuging CORS policy
Browse files- src/main.py +5 -3
src/main.py
CHANGED
|
@@ -61,9 +61,11 @@ app = FastAPI(title="Chatbot API")
|
|
| 61 |
|
| 62 |
app.add_middleware(
|
| 63 |
CORSMiddleware,
|
| 64 |
-
allow_origins=["http://localhost:8080",
|
| 65 |
-
|
| 66 |
-
allow_credentials=True,
|
|
|
|
|
|
|
| 67 |
allow_methods=["*"], # Allows all methods
|
| 68 |
allow_headers=["*"], # Allows all headers
|
| 69 |
)
|
|
|
|
| 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 |
)
|