Skip to content

set sameSite: lax by default#277

Merged
gurgunday merged 1 commit intofastify:nextfrom
gurgunday:same-site
Jan 26, 2024
Merged

set sameSite: lax by default#277
gurgunday merged 1 commit intofastify:nextfrom
gurgunday:same-site

Conversation

@gurgunday
Copy link
Copy Markdown
Member

@gurgunday gurgunday commented Jan 24, 2024

closes #268

There isn't a connection between secure and sameSite, so it doesn't make sense to override the user's setting if the connection is insecure

However, having 'lax' as the default option is useful since even though the absence of sameSite is interpreted as 'lax' by modern browsers, some user agents might not behave this way

Ref: https://web.dev/articles/samesite-cookies-explained#changes_to_the_default_behavior_without_samesite

@mcollina
Copy link
Copy Markdown
Member

The link to chrome blog is not working.

@Uzlopak @gurgunday what do you think the semversiness of this is? I'd err towards semver-major.

@mcollina mcollina requested review from Uzlopak and mcollina January 25, 2024 09:14
Copy link
Copy Markdown
Member

@mcollina mcollina 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
Copy link
Copy Markdown
Member Author

The link to chrome blog is not working.

Fixed

@mcollina mcollina added the semver-major Issue or PR that should land as semver major label Jan 25, 2024
@mcollina
Copy link
Copy Markdown
Member

After a skim through the article, I think this is semver-major.

@gurgunday gurgunday merged commit b3a2f4d into fastify:next Jan 26, 2024
@gurgunday gurgunday deleted the same-site branch January 26, 2024 14:37
jsumners pushed a commit that referenced this pull request Jul 3, 2024
jsumners added a commit that referenced this pull request Jul 3, 2024
* set sameSite: lax by default (#277)

* update for Fastify v5 (#276)

* update for v5

* Update .github/workflows/ci.yml

Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
Signed-off-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>

* Revert "Update .github/workflows/ci.yml"

This reverts commit b7a3800.

* use replaceAll

* Revert "use replaceAll"

This reverts commit c691788.

---------

Signed-off-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>

* set sameSite: lax by default (#277)

* update for Fastify v5 (#276)

* update for v5

* Update .github/workflows/ci.yml

Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
Signed-off-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>

* Revert "Update .github/workflows/ci.yml"

This reverts commit b7a3800.

* use replaceAll

* Revert "use replaceAll"

This reverts commit c691788.

---------

Signed-off-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>

* update fastify deps

* Update .github/workflows/ci.yml

Co-authored-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>
Signed-off-by: Matteo Collina <matteo.collina@gmail.com>

---------

Signed-off-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>
Signed-off-by: Matteo Collina <matteo.collina@gmail.com>
Co-authored-by: Gürgün Dayıoğlu <gurgun.dayioglu@icloud.com>
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major Issue or PR that should land as semver major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants