add HEALTHCHECK to Dockerfile and append 10.0.0.0/8 to DNSBL whitelist

This commit is contained in:
bunkerity
2021-06-14 20:54:36 +02:00
parent 491d879fec
commit 3c721dc2a0
3 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
local M = {}
local dns = require "dns"
local M = {}
local dns = require "dns"
local logger = require "logger"
local iputils = require "resty.iputils"
@@ -12,7 +12,7 @@ function M.cached ()
end
function M.check (dnsbls, resolvers)
local local_ips = iputils.parse_cidrs({"127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"})
local local_ips = iputils.parse_cidrs({"127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "10.0.0.0/8"})
if iputils.ip_in_cidrs(ngx.var.remote_addr, local_ips) then
ngx.shared.dnsbl_cache:set(ngx.var.remote_addr, "ok", 86400)
return false