cookie and source IP logic in server block
Francis Daly
francis at daoine.org
Mon Oct 14 22:35:12 UTC 2013
On Mon, Oct 14, 2013 at 06:16:14PM -0400, sfrazer wrote:
Hi there,
untested, but...
> geo $remote_addr $blocked {
> default 0;
> include /etc/nginx/conf/nginx-blocked-ips.conf;
> }
map $blocked$cookie_whatever $reallyblocked {
default 0;
1 1;
}
If it is blocked by geo, and has no cookie_whatever, then $reallyblocked
is 1. If it has any value for cookie_whatever, or $blocked is not 1,
then $reallyblocked is 0.
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list