api - whitelist IP/network for API

This commit is contained in:
florian
2021-04-26 22:22:34 +02:00
parent a3cfb50b4d
commit 5ce41edc03
7 changed files with 13 additions and 8 deletions

View File

@@ -5,5 +5,5 @@ init_by_lua_block {
ngx.log(ngx.ERR, "[Crowdsec] " .. err)
error()
end
ngx.log(ngx.ERR, "[Crowdsec] Initialisation done")
ngx.log(ngx.WARN, "[Crowdsec] Initialisation done")
}

View File

@@ -136,7 +136,7 @@ if use_crowdsec then
ngx.log(ngx.ERR, "[Crowdsec] " .. err)
end
if not ok then
ngx.log(ngx.ERR, "[Crowdsec] denied '" .. ngx.var.remote_addr .. "'")
ngx.log(ngx.WARN, "[Crowdsec] denied '" .. ngx.var.remote_addr .. "'")
ngx.exit(ngx.HTTP_FORBIDDEN)
end
end