pillarjs / cookies

Signed and unsigned cookies based on Keygrip
MIT License
1.29k stars 152 forks source link

Cookies Having Independent Partitioned State (CHIPS, also know as Partitioned cookies) #151

Closed yaverin closed 10 months ago

yaverin commented 1 year ago

Hi! Please let me know, how can I set Partitioned flag for my cookies in NodeJS/Express application via "cookies" module? Thanks in advance!

CHISP description:

shoyuf commented 1 year ago

I think this needs a pull request.

matt-neal commented 11 months ago

https://github.com/pillarjs/cookies/pull/152 PR created.

There is technically a way to work around the header not allowing partitioned by creating a utility file that overloads the toHeader function that adds the if (this.partitioned ) header += '; partitioned'; bit. Obviously, the overloaded function is not tested and I cannot guarantee that it will work in the ways you need, but it is a possibility due to the way the library is built.