So i read that IE8 and older browsers do not support "Max-Age" inside of
set-cookie headers. (but all browsers and modern support expires)
add_header Set-Cookie
"value=1;Domain=.networkflare.com;Path=/;Max-Age=2592000"; #+1 month 30
days
Apprently they support "expires" though so i changed the ab
In Lua it's as easy as:
https://github.com/openresty/lua-nginx-module/issues/19#issuecomment-19966018
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,269438,269439#msg-269439
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mai
Grant:
Has anyone experimented with displaying a more informative message
than "503 Service Temporarily Unavailable" when someone exceeds the
limit-req?
maybe https://tools.ietf.org/html/rfc6585#section-4 ?
Andreas
___
nginx mailing list
nginx@n
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 Ngin
Solved it now i forgot in lua i declare vars from nginx different.
header_filter_by_lua '
ngx.header["Set-Cookie"] = "value=1; path=/; domain=" ..
ngx.var.host_without_www .. "; Expires=" ..
ngx.cookie_time(ngx.time()+2592000) -- +1 month 30 days
';
Posted at Nginx Forum:
https://forum.n
Good, keep in mind that "ngx.time()" can be expensive, it would be advisable
to use a global var to store time and update this var once every hour.
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,269438,269444#msg-269444
___
nginx mailing lis
Can you provide a example also I seem to have a new issue with my code above
it is overwriting all my other set-cookie headers how can i have it set that
cookie but not overwrite / remove the others it seems to be a unwanted /
unexpected side effect.
Posted at Nginx Forum:
https://forum.nginx.org
You can put limit_req in a location, for example do not limit static files
and only limit expensive backend hits, or use two different thresholds.
On Fri, Sep 9, 2016 at 3:39 AM, wrote:
> Since this limit is per IP, is the scenario you stated really a problem?
> Only that IP is effected. Or as
Actually no, ngx.time() is not expensive, it uses the cached value stored in
the request so it doesn't need to make a syscall.
> On Sep 9, 2016, at 06:33, itpp2012 wrote:
>
> Good, keep in mind that "ngx.time()" can be expensive, it would be advisable
> to use a global var to store time and upd
But again, if you have a particular IP behaving badly, and limiting for that IP kicks in, I say they get what they deserve. The goal of limiting resources to one particular IP is to prevent other users from havin
10 matches
Mail list logo