fix: set allow_credentials=False to fix CORS with wildcard origin

allow_credentials=True + allow_origins=["*"] is invalid per the CORS spec.
Starlette drops the Access-Control-Allow-Origin header in this case.
The API uses no cookies so credentials are not needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
vee1e 2026-06-02 13:23:56 +05:30
parent 336b6c2659
commit fc74d0b539
No known key found for this signature in database
GPG key ID: EB498AFC60A7A01A

View file

@ -31,7 +31,7 @@ else:
app.add_middleware(
CORSMiddleware,
allow_origins=allow_origins,
allow_credentials=True,
allow_credentials=False,
allow_methods=["*"],
allow_headers=["*"],
)