fix: CORS allow_methods добавить GET для /health эндпоинтов
CORSMiddleware: allow_methods=['POST'] → ['GET', 'POST'] Позволяет браузерам делать GET-запросы к /health и /api/health без CORS-блокировки. BATON-FIX-013
This commit is contained in:
parent
36087c3d9e
commit
6d5d84a882
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ app = FastAPI(lifespan=lifespan)
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=[config.FRONTEND_ORIGIN],
|
allow_origins=[config.FRONTEND_ORIGIN],
|
||||||
allow_methods=["POST"],
|
allow_methods=["GET", "POST"],
|
||||||
allow_headers=["Content-Type", "Authorization"],
|
allow_headers=["Content-Type", "Authorization"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue