mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
[#922] Add whitelist check for the default-server as well and fix badbehavior whitelist check
This commit is contained in:
parent
2e7ddb69f9
commit
2d2526bc5c
3 changed files with 13 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ end
|
|||
|
||||
function badbehavior:log()
|
||||
-- Check if we are whitelisted
|
||||
if is_whitelisted(self.ctx) == "yes" then
|
||||
if is_whitelisted(self.ctx) then
|
||||
return self:ret(true, "client is whitelisted")
|
||||
end
|
||||
-- Check if bad behavior is activated
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
"reversescan"
|
||||
],
|
||||
"log_stream": ["badbehavior", "bunkernet"],
|
||||
"log_default": ["badbehavior", "bunkernet", "errors", "misc", "metrics"],
|
||||
"log_default": [
|
||||
"whitelist",
|
||||
"badbehavior",
|
||||
"bunkernet",
|
||||
"errors",
|
||||
"misc",
|
||||
"metrics"
|
||||
],
|
||||
"timer": ["metrics"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,10 @@ function whitelist:preread()
|
|||
return self:access()
|
||||
end
|
||||
|
||||
function whitelist:log_default()
|
||||
return self:access()
|
||||
end
|
||||
|
||||
function whitelist:kind_to_ele(kind)
|
||||
if kind == "IP" then
|
||||
return "ip" .. self.ctx.bw.remote_addr
|
||||
|
|
|
|||
Loading…
Reference in a new issue