
#######################################################################################################
# COOKIE protect (local enabled)

location = /cprot/captcha-request.php {
	limit_req zone=rpsipdyn burst=10;
	proxy_pass http://127.0.0.1:97;
}
location ^~ /cprot-assets/ {
	alias /web/sys/captcha/cprot-assets/;
	try_files $uri =403;
}
location @cookieprotect {
	root /web/sys/captcha;
	try_files $uri /index.html =403;
}

location @cookieprotect-nocaptcha {
	default_type text/html;
	#add_header Set-Cookie "_cms_prot_=1; Path=/";
	#return 200 "<html><body><script>location.reload();</script></body></html>";
	return 200 "<html><body><script>document.cookie='_cms_prot_=1; Path=/';location.reload();</script></body></html>";
}
