Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: nginx config question, rules?

$
0
0
map $http_cookie $checkCookie {
default 0;
~$SHA1 1;
}

Then inside a location block:

if ($checkCookie) { return 403; } # or whatever you want to happen instead of a 403

If you want to allow things when $SHA1 is filled then turn the 0 and 1 around in the map.

Viewing all articles
Browse latest Browse all 4759

Trending Articles