How to enable cookies through nuxt middleware?
Due to the limitation of GDPR, cookies cannot be enabled for all users.
But I can know whether the user is allowed through other cookies
So I want to enable cookies dynamically, For example, nuxt middleware.
Is there any way?
Thanks
You can disable the cookie (detectBrowserLanguage.useCookie) but I'm not sure how this will affect the detectBrowserLanguage logic. Would need to check the code. You could potentially implement custom logic to store that cookie when needed, after disabling that option.
That said, even with GDPR you should be able to treat this cookie as "essential" and not have to avoid setting it.
When the detectBrowserLanguage. useCookie is set to false, thesetLocaleCookie is invalid. Actively set i18n_ Redirected cookies and redirects do not work.
That said, even with GDPR you should be able to treat this cookie as "essential" and not have to avoid setting it.
Exactly. Functional cookies are exempted from needing to be disabled because of GDPR.
Yes, given the above, I don't see the need to do address this.