antibot - basic pow with javascript
This commit is contained in:
@@ -242,7 +242,7 @@ if use_crowdsec then
|
||||
end
|
||||
|
||||
-- cookie check
|
||||
if use_antibot_cookie then
|
||||
if use_antibot_cookie and ngx.var.uri ~= "/favicon.ico" then
|
||||
if not cookie.is_set("uri") then
|
||||
if ngx.var.request_uri ~= antibot_uri then
|
||||
cookie.set({uri = ngx.var.request_uri})
|
||||
@@ -258,7 +258,7 @@ if use_antibot_cookie then
|
||||
end
|
||||
|
||||
-- javascript check
|
||||
if use_antibot_javascript then
|
||||
if use_antibot_javascript and ngx.var.uri ~= "/favicon.ico" then
|
||||
if not cookie.is_set("javascript") then
|
||||
if ngx.var.request_uri ~= antibot_uri then
|
||||
cookie.set({uri = ngx.var.request_uri, challenge = javascript.get_challenge()})
|
||||
@@ -268,7 +268,7 @@ if use_antibot_javascript then
|
||||
end
|
||||
|
||||
-- captcha check
|
||||
if use_antibot_captcha then
|
||||
if use_antibot_captcha and ngx.var.uri ~= "/favicon.ico" then
|
||||
if not cookie.is_set("captcha") then
|
||||
if ngx.var.request_uri ~= antibot_uri then
|
||||
cookie.set({uri = ngx.var.request_uri})
|
||||
@@ -278,7 +278,7 @@ if use_antibot_captcha then
|
||||
end
|
||||
|
||||
-- recaptcha check
|
||||
if use_antibot_recaptcha then
|
||||
if use_antibot_recaptcha and ngx.var.uri ~= "/favicon.ico" then
|
||||
if not cookie.is_set("recaptcha") then
|
||||
if ngx.var.request_uri ~= antibot_uri then
|
||||
cookie.set({uri = ngx.var.request_uri})
|
||||
|
||||
Reference in New Issue
Block a user