Welcome! Log In Create A New Profile

Advanced

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

B.R.
September 10, 2016 09:58AM
I just hope that code won't be used by the owner of wwwooowww.wtf for
example.
---
*B. R.*

On Sat, Sep 10, 2016 at 2:46 PM, c0nw0nk <nginx-forum@forum.nginx.org>
wrote:

> Just fixed my problem completely now :)
>
> For anyone who also uses Lua and wants to overcome this cross browser
> compatibility issue with expires and max-age cookie vars.
>
> if ($host ~* www(.*)) {
> set $host_without_www $1;
> }
> set_by_lua $expires_time 'return ngx.cookie_time(ngx.time()+2592000)';
> add_header Set-Cookie
> "value=1;domain=$host_without_www;path=/;expires=$expires_
> time;Max-Age=2592000";
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,269438,269452#msg-269452
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

c0nw0nk September 09, 2016 03:01AM

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

itpp2012 September 09, 2016 03:41AM

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

c0nw0nk September 09, 2016 04:57AM

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

c0nw0nk September 09, 2016 05:38AM

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

itpp2012 September 09, 2016 07:33AM

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

c0nw0nk September 09, 2016 08:03AM

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

c0nw0nk September 10, 2016 08:46AM

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

Robert Paprocki September 09, 2016 12:10PM

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

B.R. September 10, 2016 09:58AM

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

c0nw0nk September 10, 2016 10:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready