Open ozataman opened 4 years ago
What do you think SameSite support should look like?
I think it would probably make sense to copy what the cookie
package is doing here:
SameSiteOption
sum type representing the different SameSite cookie attributescookieSameSite :: Maybe SameSiteOption
to Snap's Cookie
The difficult question, to me, is what to do about the fact that this is going to be a breaking change. There are a few paths I can think of here, but I like the following two the best:
Cookie
behind smart constructors (cf. SetCookie
, and release this as breakingCookie
with a default SameSite value of None, mark the existing Cookie
as deprecated, and release this as a non-breaking change
Cookie
precisely captures what this structure is supposed to be and it would necessarily not be possible to change the name without incurring another breaking change in the future
Chrome is now producing warnings that cross site requests will be disabled unless marked with SameSite=None in the near future. Dropping into using the
cookie
package is always an option but a significant inconvenience prone to mistakes.