update
This commit is contained in:
parent
8a59fb28c3
commit
8014c96072
1 changed files with 4 additions and 3 deletions
|
@ -33,7 +33,7 @@ function csmod.init(configFile, userAgent)
|
||||||
captcha_ok = true
|
captcha_ok = true
|
||||||
|
|
||||||
if runtime.conf["REDIRECT_LOCATION"] == "/" then
|
if runtime.conf["REDIRECT_LOCATION"] == "/" then
|
||||||
ngx.log(ngx.WARN, "redirect location is set to '/' this will lead into infinite redirection")
|
ngx.log(ngx.ERR, "redirect location is set to '/' this will lead into infinite redirection")
|
||||||
end
|
end
|
||||||
|
|
||||||
err = recaptcha.New(runtime.conf["SITE_KEY"], runtime.conf["SECRET_KEY"], runtime.conf["CAPTCHA_TEMPLATE_PATH"])
|
err = recaptcha.New(runtime.conf["SITE_KEY"], runtime.conf["SECRET_KEY"], runtime.conf["CAPTCHA_TEMPLATE_PATH"])
|
||||||
|
@ -384,8 +384,9 @@ function csmod.Allow(ip)
|
||||||
ngx.log(ngx.ERR, "whitelisted location: " .. v)
|
ngx.log(ngx.ERR, "whitelisted location: " .. v)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if utils.ends_with(v, "/") == false then
|
uri_to_check = v
|
||||||
uri_to_check = v .. "/"
|
if utils.ends_with(uri_to_check, "/") == false then
|
||||||
|
uri_to_check = uri_to_check .. "/"
|
||||||
end
|
end
|
||||||
if utils.starts_with(ngx.var.uri, uri_to_check) then
|
if utils.starts_with(ngx.var.uri, uri_to_check) then
|
||||||
ngx.log(ngx.ERR, "whitelisted location: " .. uri_to_check)
|
ngx.log(ngx.ERR, "whitelisted location: " .. uri_to_check)
|
||||||
|
|
Loading…
Add table
Reference in a new issue