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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remix): Ensure headers with the same name do not get overwritten #3345

Merged
merged 3 commits into from
May 8, 2024

Conversation

BRKalow
Copy link
Member

@BRKalow BRKalow commented May 8, 2024

Description

When authenticating a request, it's possible we may pass multiple headers with the same name (e.g. multiple Set-Cookie headers). By using headers.set(), we were only accepting the last header of that name. Switching to headers.append() should fix this.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 馃悰 Bug fix
  • 馃専 New feature
  • 馃敤 Breaking change
  • 馃摉 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented May 8, 2024

馃 Changeset detected

Latest commit: 7f0573b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/remix Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@BRKalow
Copy link
Member Author

BRKalow commented May 8, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @BRKalow - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 1.1.2-snapshot.vaa3ad1f
@clerk/chrome-extension 1.0.6-snapshot.vaa3ad1f
@clerk/clerk-js 5.2.2-snapshot.vaa3ad1f
@clerk/elements 0.3.3-snapshot.vaa3ad1f
@clerk/eslint-config-custom 0.0.1-snapshot.vaa3ad1f
@clerk/clerk-expo 1.0.6-snapshot.vaa3ad1f
@clerk/express 0.0.5-snapshot.vaa3ad1f
@clerk/fastify 1.0.4-snapshot.vaa3ad1f
gatsby-plugin-clerk 5.0.0-beta.45
@clerk/nextjs 5.0.7-snapshot.vaa3ad1f
@clerk/clerk-react 5.0.4-snapshot.vaa3ad1f
@clerk/remix 4.0.5-snapshot.vaa3ad1f
@clerk/clerk-sdk-node 5.0.4-snapshot.vaa3ad1f
@clerk/shared 2.0.2-snapshot.vaa3ad1f
@clerk/testing 1.0.3-snapshot.vaa3ad1f
@clerk/themes 2.1.3-snapshot.vaa3ad1f
@clerk/types 4.2.1-snapshot.vaa3ad1f

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend

npm i @clerk/backend@1.1.2-snapshot.vaa3ad1f --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.6-snapshot.vaa3ad1f --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.2.2-snapshot.vaa3ad1f --save-exact

@clerk/elements

npm i @clerk/elements@0.3.3-snapshot.vaa3ad1f --save-exact

@clerk/eslint-config-custom

npm i @clerk/eslint-config-custom@0.0.1-snapshot.vaa3ad1f --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.0.6-snapshot.vaa3ad1f --save-exact

@clerk/express

npm i @clerk/express@0.0.5-snapshot.vaa3ad1f --save-exact

@clerk/fastify

npm i @clerk/fastify@1.0.4-snapshot.vaa3ad1f --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.0.7-snapshot.vaa3ad1f --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.0.4-snapshot.vaa3ad1f --save-exact

@clerk/remix

npm i @clerk/remix@4.0.5-snapshot.vaa3ad1f --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.4-snapshot.vaa3ad1f --save-exact

@clerk/shared

npm i @clerk/shared@2.0.2-snapshot.vaa3ad1f --save-exact

@clerk/testing

npm i @clerk/testing@1.0.3-snapshot.vaa3ad1f --save-exact

@clerk/themes

npm i @clerk/themes@2.1.3-snapshot.vaa3ad1f --save-exact

@clerk/types

npm i @clerk/types@4.2.1-snapshot.vaa3ad1f --save-exact

@BRKalow BRKalow requested a review from a team May 8, 2024 02:44
@LekoArts LekoArts enabled auto-merge (squash) May 8, 2024 07:23
@LekoArts LekoArts merged commit 9a05b09 into main May 8, 2024
10 checks passed
@LekoArts LekoArts deleted the brk.fix/remix-set-headers branch May 8, 2024 07:45
@clerk-cookie clerk-cookie mentioned this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants