<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I just hope that code won't be used by the owner of wwwooowww.wtf for example.<br></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Sat, Sep 10, 2016 at 2:46 PM, c0nw0nk <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just fixed my problem completely now :)<br>
<br>
For anyone who also uses Lua and wants to overcome this cross browser<br>
compatibility issue with expires and max-age cookie vars.<br>
<br>
if ($host ~* www(.*)) {<br>
set $host_without_www $1;<br>
}<br>
set_by_lua $expires_time 'return ngx.cookie_time(ngx.time()+<wbr>2592000)';<br>
add_header Set-Cookie<br>
"value=1;domain=$host_without_<wbr>www;path=/;expires=$expires_<wbr>time;Max-Age=2592000";<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,269438,269452#msg-269452" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,269438,269452#msg-269452</a><br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>