diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index ca5733cd..d54fadd8 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -315,7 +315,9 @@ export default class SupabaseClient< fetch, // auth checks if there is a custom authorizaiton header using this flag // so it knows whether to return an error when getUser is called with no session - hasCustomAuthorizationHeader: 'Authorization' in this.headers, + hasCustomAuthorizationHeader: Object.keys(this.headers).some( + (key) => key.toLowerCase() === 'authorization' + ), }) }