-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat!: Decrease cookie expiration to 5 hours, only set cookie when necessary and only disable cookie if localeCookie: false
is set
#1487
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
localeCookie: false
is set
localeCookie: false
is setlocaleCookie: false
is set
|
||
Please note that legal requirements may vary by region, so it's advisable to verify them independently. While we strive to keep this information as up-to-date as possible, we cannot guarantee its accuracy. | ||
|
||
</Details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorgebef Would you by chance like to have a look if this matches your understanding?
See rendered version.
Some context: This PR includes a few changes to the cookie handling for next-intl@4
that should make the package GDPR-compliant out of the box.
With this change,
next-intl
is now compliant with the latest GDPR requirements out of the box without any work necessary on the app developer side (see docs).If you want to increase the cookie expiration, e.g. because you're informing users about the usage of cookies or if GDPR doesn't apply to you, you can use the
maxAge
attribute to do so:Breaking changes
maxAge
attribute of the locale cookie is decreased from 1 year to 5 hours in order to be GDPR-compliant.accept-language: 'en'
will cause a cookie to be set when/de
is requested to remember the preference forde
. In case you've previously relied onNEXT_LOCALE
to always be available, please consider reading the locale viagetLocale
.localeDetection: false
previously ambiguously also disabled the cookie from being set. This is no longer the case. For consistency, you can now use the explicitlocaleCookie: false
option instead.