color-mode
color-mode copied to clipboard
feat: add cookie attributes
π Linked issue
none
β Type of change
- [ ] π Documentation (updates to the documentation or readme)
- [ ] π Bug fix (a non-breaking change that fixes an issue)
- [x] π Enhancement (improving an existing functionality)
- [ ] β¨ 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
I added cookieAttribsto the module config. This allows to specify any cookie attribute for further configuration. Now we can specify path, domain etc. so that color-mode works across subdomains.
Thank you
Deploy Preview for nuxt-color-mode canceled.
| Name | Link |
|---|---|
| Latest commit | 9978f41d69f44f84d11235e0ce52e641f0646e49 |
| Latest deploy log | https://app.netlify.com/sites/nuxt-color-mode/deploys/67ed77c304e40400083f0707 |
May i ask to improve naming? Would be nice to use cookieAttributes insted of cookieAttribs since there is no otrher abbreviations or atleast cookieAttrs since it's canonical abbreviation for attributes.
I'm wondering, I don't think domain is very useful though, but what about just forcing the path to be / to it applies to all the website by default?
any updates?
lgtm, tried locally with the cookieAttrs changes and that pesky "Some cookies are misusing the recommended βSameSiteβ attribute" is gone
partial support landed via https://github.com/nuxt-modules/color-mode/pull/320, but we can iterate here to allow configuration