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

Re: nginx config question, rules?

$
0
0
itpp2012 Wrote:
-------------------------------------------------------
> 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.


Thanks, but wouldn't i need to store the cookie like this?

CookieName=CookiueValue

in my case

CookieName=$SHA1

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>