Commit ef67fcc0 by Joneq

增加对referer的访问白名单

parent fdda6deb
Showing with 6 additions and 0 deletions
...@@ -60,7 +60,13 @@ if config.redis_auth ~= "" and ok then ...@@ -60,7 +60,13 @@ if config.redis_auth ~= "" and ok then
end end
if ngx.req.get_headers()['referer'] == nil then
ngx.req.get_headers()['referer'] = ""
end
ngx.say(ngx.req.get_headers()['referer'])
ngx.say(red:sismember('ichunt_waf_white_referer', ngx.req.get_headers()['referer']))
ngx.say(red:sismember('ichunt_waf_white_referer', ngx.req.get_headers()['referer']) == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment