add_header Set-Cookie The difference between Max-Age and Expires

c0nw0nk nginx-forum at forum.nginx.org
Fri Sep 9 08:57:25 UTC 2016


if ($host ~* www(.*)) {
set $host_without_www $1;
}
header_filter_by_lua '
	ngx.header["Set-Cookie"] = "value=1; path=/; domain=$host_without_www;
Expires=" .. ngx.cookie_time(ngx.time()+2592000) -- +1 month 30 days
';

So i added this to my config but does not work for me :(

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269438,269441#msg-269441



More information about the nginx mailing list