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

use 'lax' instead of 'Lax' as default for cookie sameSite option when secure is set to 'auto' #271

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

gunjam
Copy link
Contributor

@gunjam gunjam commented Oct 10, 2024

Change to support @fastify/cookie ^11.0.0

When setting the secure option to 'auto' the cookie option of 'Lax' is being set by default for non HTTPS traffic, which is causing the jshttp/cookie module to throw as it now only supports the lowercase option of 'lax'.

Had to update the tests to check for maxAge 0 on expiry which @fastify/cookie is now also having to set due to changes in jshttp/cookie.

Change to support @fastify/cookie ^11.0.0

The downstream jshttp/cookie module now enforces the sameSite option to
be lowercase, which means this default is causing the plugin to throw
when setting the session cookie.

Signed-off-by: Niall Molloy <[email protected]>
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

@gurgunday gurgunday merged commit 4ad874e into fastify:master Oct 10, 2024
11 checks passed
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.

2 participants