|
|
|
@ -62,6 +62,15 @@ local function get_waf_drop_ip() |
|
|
|
|
return data |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local function return_json(status,msg) |
|
|
|
|
ngx.header.content_type = "application/json" |
|
|
|
|
result = {} |
|
|
|
|
result['status'] = status |
|
|
|
|
result['msg'] = msg |
|
|
|
|
ngx.say(json.encode(data)) |
|
|
|
|
ngx.exit(200) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local function is_chekc_table(data,strings) |
|
|
|
|
if type(data) ~= 'table' then return 1 end |
|
|
|
|
if not data then return 1 end |
|
|
|
@ -308,8 +317,10 @@ local function waf_cc_increase() |
|
|
|
|
if params['uri_request_args']['token'] then |
|
|
|
|
local args_token = params['uri_request_args']['token'] |
|
|
|
|
if args_token == make_token then |
|
|
|
|
ngx.shared.waf_limit:set(cache_token,1, config['safe_verify']['time']) |
|
|
|
|
C:return_message(0,'ok') |
|
|
|
|
ngx.shared.waf_limit:set(cache_token, 1, config['safe_verify']['time']) |
|
|
|
|
local data = get_return_state(0, "ok") |
|
|
|
|
ngx.say(json.encode(data)) |
|
|
|
|
ngx.exit(200) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|