i18n
i18n copied to clipboard
feat: add httpOnly flag to cookie options in getI18nCookie function
π Linked issue
https://github.com/nuxt-modules/i18n/issues/3059
β Type of change
- [ ] π Documentation (updates to the documentation, readme or JSdoc annotations)
- [ ] π Bug fix (a non-breaking change that fixes an issue)
- [ ] π Enhancement (improving an existing functionality like performance)
- [x] β¨ New feature (a non-breaking change that adds functionality)
- [ ] π§Ή Chore (updates to the build process or auxiliary tools and libraries)
- [ ] β οΈ Breaking change (fix or feature that would cause existing functionality to change)
π Description
Resolves #3059
π Checklist
- [ ] I have linked an issue or discussion.
- [ ] I have added tests (if possible).
- [ ] I have updated the documentation accordingly.
Wouldn't setting httpOnly: true break language switching since the cookie cannot be changed on the client-side? If that is the case, we should add this to the documentation π€
Wouldn't setting
httpOnly: truebreak language switching since the cookie cannot be changed on the client-side? If that is the case, we should add this to the documentation π€
Itβs possible to encounter this issue. While the cookie may not update immediately when the user switches the language using useSwitchLocalePath, it will sync with the address upon refreshing the current page.