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

Re: nginx config question, rules?

$
0
0
or even

set $l7_protect 0;



set_sha1 $SHA1Cookie test;
set $COCK TechPulse_Firewall=;
set $DICK $COCK$SHA1Cookie;

if ($whiteListedIP = "true") {
set $l7_protect 1;
}

if ($request_uri ~* "lite-api.php") {
set $l7_protect 1;
}

if ($http_cookie ~ $DICK) {
set $l7_protect 1;
}


if ($l7_protect = 0) {
add_header Set-Cookie 'TechPulse_Firewall=$SHA1Cookie;Path=/';
rewrite ^ $scheme://$host$request_uri permanent;
# rewrite ^ /error-pages/checkCookie.html last;
}



ughhhhhhhhhh

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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