Skip to content

Conversation

@bn8204
Copy link

@bn8204 bn8204 commented Jan 7, 2026

Fixes #1832.

When allow_credentials is enabled and a request includes an Authorization
header, CORSMiddleware was returning Access-Control-Allow-Origin: *, which
is rejected by browsers for credentialed requests.

This change mirrors the existing cookie-based behavior and ensures an explicit
origin is returned when Authorization headers are present.

Tests were run locally and pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CORSMiddleware does not provide explicit origin although Authorization header is present

1 participant