This commit is contained in:
alteredCoder 2022-01-26 18:52:01 +01:00
parent 8b0195f051
commit 814156661e

View file

@ -350,7 +350,9 @@ function csmod.Allow(ip)
ngx.log(ngx.ALERT, "[Crowdsec] denied '" .. ngx.var.remote_addr .. "' with '"..remediation.."'")
if remediation == "ban" then
ret_code = runtime.conf["RET_CODE"]
ngx.redirect(runtime.conf["REDIRECT_PATH"], utils.HTTP_CODE[ret_code])
ngx.req.set_header("Location", runtime.conf["REDIRECT_PATH"])
ngx.status = utils.HTTP_CODE[ret_code]
return
end
-- if the remediation is a captcha and captcha is well configured