cloudflare / lua-resty-cookie

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

Cross domain cookie #19

Open shubenkov opened 7 years ago

shubenkov commented 7 years ago

Hello.

If I try to set cookie for different domain, it does not work.

For example I go to site.corp.com and I want to set cookie to this session, but for different domain. For example to site.bank.net.

Is it possible?

calio commented 7 years ago

You can do it by set the domain part of the cookie. It is documented here https://github.com/cloudflare/lua-resty-cookie#set.