# Apply @supabase/ssr PR #176 fix for CDN cache prevention#592
Merged
larbish merged 7 commits intonuxt-modules:mainfrom Apr 3, 2026
Merged
# Apply @supabase/ssr PR #176 fix for CDN cache prevention#592larbish merged 7 commits intonuxt-modules:mainfrom
larbish merged 7 commits intonuxt-modules:mainfrom
Conversation
|
@jlemonz is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
larbish
approved these changes
Apr 3, 2026
Member
larbish
left a comment
There was a problem hiding this comment.
I did remove the logger myself 👌
Contributor
Author
|
Yes thank you. Do note I am not a senior dev. |
Contributor
Author
|
Any timeframe when this will be released? Also maybe include the newly released https://github.com/supabase/supabase-js/releases/tag/v2.102.0 ? |
Member
|
It has been released in https://github.com/nuxt-modules/supabase/releases/tag/v2.0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apply @supabase/ssr PR #176 fix for CDN cache prevention
Types of changes
Description
This PR applies the fix from supabase/ssr#176 to prevent CDN caching of authentication responses.
Problem
When
@supabase/ssrrefreshes a session server-side, the new JWT is written to the response viaSet-Cookie. If a CDN (CloudFront, Vercel Edge, Cloudflare, etc.) caches that response and serves it to a different user, that user's browser stores the cached token and is signed in as the wrong person. This has been confirmed in production by multiple users.See: supabase/supabase-js#1682
Solution
Updated the
setAllcookie callback to accept a second parameterheaders: Record<string, string>containing cache control headers. When@supabase/ssrrefreshes tokens, it now passes these headers:These headers are automatically applied to the HTTP response to prevent CDN caching.
Changes Made
@supabase/ssrfrom^0.9.0to^0.10.0(includes the upstream fix)src/runtime/utils/cookies.ts:setHeaderimport from h3setCookiesfunction to accept optionalheadersparametersrc/runtime/server/services/serverSupabaseClient.ts:setAllcallback to accept and passheadersparametersrc/runtime/plugins/supabase.server.ts:setAllcallback to accept and passheadersparameterChecklist:
@supabase/ssrwhich has its own test coverage. The fix is a direct integration of the upstream changes.Related Issues