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

Allow "sameSite" for detectBrowserLanguage cookie configuration #516

Closed
Borisstoy opened this issue Nov 2, 2019 · 3 comments · Fixed by #519
Closed

Allow "sameSite" for detectBrowserLanguage cookie configuration #516

Borisstoy opened this issue Nov 2, 2019 · 3 comments · Fixed by #519

Comments

@Borisstoy
Copy link

What problem does this feature solve?

As per Chrome requirement:

A cookie associated with a cross-site resource at http://cloudflare.com/ was set without the SameSite attribute.

In order to be able to use cookies for browsers language detection, we need the "sameSite" option while setting the "i18n_redirected" cookie.

What does the proposed changes look like?

Add an extra option "sameSite", boolean value.

detectBrowserLanguage: {
...
sameSite: true
...
},

This feature request is available on Nuxt community (#c337)
@ghost ghost added the cmty:feature-request label Nov 2, 2019
@rchl
Copy link
Collaborator

rchl commented Nov 4, 2019

@Borisstoy
I think it would make sense to create cookie with SameSite=Lax attribute by default. I don't really see why would we need an option for it.

@Borisstoy
Copy link
Author

@rchl , indeed.

@rchl rchl closed this as completed in #519 Nov 7, 2019
rchl added a commit that referenced this issue Nov 7, 2019
Avoids warnings triggered by browsers related to cookie not having
sameSite attribute.

More details at https://web.dev/samesite-cookies-explained/

Resolves #516
@e-lobo
Copy link

e-lobo commented Mar 27, 2020

this issue still persists

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 a pull request may close this issue.

3 participants