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

fix(dbAuth): Don't use Multi Value Headers on Vercel #11718

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Nov 11, 2024

Vercel doesn't support multiValueHeaders. See vercel/vercel#7820
Netlify only supports multiValueHeaders for how we set our auth cookies: #10889

So this PR tries to solve for both by adding a check for a Vercel-specific header.

I worry this will break (they might change what headers they set). But it's the best solution I could come up with for now

@Tobbe Tobbe force-pushed the tobbe-dbauth-cookies-vercel branch from c86829a to 01df61e Compare November 11, 2024 18:31
@Tobbe Tobbe changed the title fix(dbAuth): Delete cookie header before setting fix(dbAuth): Don't use Multi Value Headers on Vercel Nov 12, 2024
@Tobbe Tobbe added the release:fix This PR is a fix label Nov 12, 2024
@Tobbe Tobbe added this to the next-release-patch milestone Nov 12, 2024
@Tobbe Tobbe self-assigned this Nov 12, 2024
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve as worked on Vercel and Netlify. Just one question about where MVH detection could be.

packages/auth-providers/dbAuth/api/src/shared.ts Outdated Show resolved Hide resolved
@Tobbe Tobbe enabled auto-merge (squash) November 12, 2024 13:22
@Tobbe Tobbe added the fixture-ok Override the test project fixture check label Nov 12, 2024
@Tobbe Tobbe merged commit 20b3c77 into redwoodjs:main Nov 12, 2024
50 checks passed
@Tobbe Tobbe deleted the tobbe-dbauth-cookies-vercel branch November 19, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixture-ok Override the test project fixture check release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants