Skip to content

Avoid overwriting authorization header #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

cuzzlor
Copy link
Collaborator

@cuzzlor cuzzlor commented Oct 9, 2024

What

The copySessionJwtToBearerHeader utility request handler blindly overwrites any existing Authorization header value with a Bearer {} value, if there is an auth session.

This is confusing behaviour when you explicitly set an Authorization header value on a request and it is overwritten from a session cookie.

It seems a better approach would be:

  • If there is no Authorization header value, set it (from the session cookie).
  • The client can then explicitly set Authorizationheader values when needed, for specific requests.

@cuzzlor cuzzlor requested a review from mderriey October 9, 2024 06:29
@cuzzlor cuzzlor merged commit 2ac8617 into main Oct 9, 2024
1 check passed
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.

2 participants