cloudflare / lua-resty-cookie

Lua library for HTTP cookie manipulations for OpenResty/ngx_lua
347 stars 160 forks source link

Add `None` as a valid `SameSite` value #32

Closed eberbis closed 4 years ago

eberbis commented 4 years ago

Following https://github.com/cloudflare/lua-resty-cookie/pull/12, this PR allows for cookies to have their attribute SameSite set to None.

See: https://tools.ietf.org/html/draft-west-first-party-cookies-07

Chrome will be releasing these changes on February: https://blog.chromium.org/2019/10/developers-get-ready-for-new.html

ElvinEfendi commented 4 years ago

👍 would be great to get this merged soon!

RulerOf commented 4 years ago

I'm going to comment here in addition to the +1.

Chrome is going to start defaulting SameSite to Lax in 14 days.

There will probably be more people winding their way in here this week as we scramble to patch this from the Ops side of things.

jdesgats commented 4 years ago

Thanks for your PR, merged now! Sorry for the slow reply.

eberbis commented 4 years ago

Thanks a lot @jdesgats!

ElvinEfendi commented 4 years ago

@jdesgats when are you planning to release this in Luarocks?

jdesgats commented 4 years ago

I can tag a release, but we don't officially distribute modules on Luarocks at this time: the module is owned by @calio.

jdesgats commented 4 years ago

@ElvinEfendi I added a SCM rockspec in the repo, so you should be able to install the master version with

luarocks install https://raw.githubusercontent.com/cloudflare/lua-resty-cookie/master/rockspecs/lua-resty-cookie-scm-1.rockspec