Fix CORS policy for production deployment

This commit is contained in:
2026-02-21 14:26:27 -05:00
parent ff8be5a036
commit d1c19212d6

View File

@ -27,9 +27,16 @@ app = FastAPI(
) )
# CORS middleware # CORS middleware
origins = [
"http://localhost:5173",
"http://127.0.0.1:5173",
"https://sibu2-0-transport-2026.web.app",
"https://sibu2-0-transport-2026.firebaseapp.com",
]
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["*"], # Configure properly for production allow_origins=origins,
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],