update http-dec-req-hdr.lua

This commit is contained in:
zjcqoo 2019-05-11 09:13:01 +08:00
parent 7f297ab5eb
commit e5f1a28d1e

View File

@ -22,13 +22,14 @@ for k, v in pairs(hdrs) do
ngx.var._mode = v ngx.var._mode = v
elseif k == 'aceh' then elseif k == 'aceh' then
ngx.ctx._acehOld = true ngx.ctx._acehOld = true
elseif k == 'level' then
ngx.var._level = v
ngx.ctx._level = tonumber(v)
elseif k == 'ext' then elseif k == 'ext' then
extHdrs = require('cjson').decode(v) extHdrs = require('cjson').decode(v)
else else
if k == 'referer' then if k == 'referer' then
ngx.var._ref = v ngx.var._ref = v
else if k == 'cookie' then
ngx.ctx._hasCookie = true
end end
ngx.req.set_header(k, v) ngx.req.set_header(k, v)
end end