Skip to content
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

New check for a custom Authorization header is case sensitive. Headers are case insensitive #1043

Open
GaryAustin1 opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GaryAustin1
Copy link

Bug report

  • [x ] I confirm this is a bug with Supabase, not with my own application.
  • [ x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The new code added 3 weeks ago is checking for an Authorization header. It looks for 'Authorization' in the header array. http headers are case insensitive.

Just worked on a user issue where they loaded the header in authorization = .... and then used the header option authorization in the global headers object.
This should work.

The change was here @kangmingtay
(https://github.com/supabase/supabase-js/blame/4dff472a15cb754bf9fa81af495a84b1f0c42b14/src/SupabaseClient.ts#L282)

To Reproduce

use

global: {
    headers: { 'authenticated': 'bearer myjwt' }

in createClient

Expected behavior

Case of header name should not matter.

@GaryAustin1 GaryAustin1 added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant