Fetch the repository succeeded.
This action will force synchronization from bukale/zhongkui-waf, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
-- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
-- Copyright (c) 2023 bukale bukale2022@163.com
local geoip = require "geoip"
local config = require "config"
local lib = require "lib"
local ip_utils = require "ip_utils"
local request = require "request"
local stringutf8 = require "stringutf8"
local default_if_blank = stringutf8.default_if_blank
local generate_id = request.generate_id
local is_site_option_on = config.is_site_option_on
local get_client_ip = ip_utils.get_client_ip
local function init()
local ctx = ngx.ctx
local ip = get_client_ip()
ctx.ip = ip
ctx.ua = default_if_blank(ngx.var.http_user_agent, '')
ctx.geoip = geoip.lookup(ip)
ctx.request_id = generate_id()
ctx.server_name = default_if_blank(ngx.var.server_name, 'unknown')
end
if is_site_option_on("waf") then
init()
lib.is_white_ip()
lib.is_black_ip()
lib.is_unsafe_http_method()
lib.is_bot()
lib.is_acl()
lib.is_cc()
lib.is_white_url()
lib.is_black_url()
lib.is_evil_args()
lib.is_evil_headers()
lib.is_evil_cookies()
lib.is_evil_request_body()
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。