Skip to content

fix(auth): honor case-insensitive custom headers - #1767

Open
hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/auth-header-case-insensitive
Open

hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/auth-header-case-insensitive

Conversation

@hsusul

@hsusul hsusul commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #1764.

Summary

Build Auth request headers with HTTPX's case-insensitive Headers mapping. A caller's lower-case x-supabase-api-version now overrides the default instead of being sent alongside it. The change covers sync and async clients.

Verification

  • The new sync/async MockTransport regressions failed on upstream with both the custom and default version values, then passed with the fix.
  • Auth package suite: 179 passed.
  • Auth Ruff lint/format, mypy, package build, and git diff --check passed.

Related but distinct: #1688 covers stale Authorization in the Functions client's set_auth(); this PR covers Auth request-default merging.

@olirice @silentworks — review requested per CONTRIBUTING.md.

@hsusul
hsusul requested a review from o-santi as a code owner October 18, 2026 23:52

This branch has not been deployed

No deployments
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.

Auth lower-case custom API-version headers are duplicated

1 participant