Skip to content

CORSMiddleware: allow_credentials=True with allow_origins=["*"] causes credentialed CORS to fail / behave unexpectedly #393

@mahyar-jahaninasab

Description

@mahyar-jahaninasab

Using FastAPI’s CORSMiddleware with allow_credentials=True and allow_origins=["*"] looks like it should “allow all origins with credentials,” but browsers refuse credentialed CORS responses when Access-Control-Allow-Origin is *. This leads to confusing behavior where requests may hit the API but the frontend still gets blocked by the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions