commit
81114fc467
@ -94,7 +94,8 @@ server {
|
||||
|
||||
set $csp "";
|
||||
access_by_lua '
|
||||
if ngx.req.get_method() == "GET" then
|
||||
local accept_header = ngx.req.get_headers()["Accept"]
|
||||
if ngx.req.get_method() == "GET" and accept_header ~= nil and string.find(accept_header, "html") then
|
||||
local key = string.format("csp:%s",ngx.var.host)
|
||||
local redis = require "resty.redis"
|
||||
local red = redis:new()
|
||||
|
Loading…
Reference in New Issue
Block a user