remove unused file, fix ngx.exit status issue
This commit is contained in:
@@ -45,6 +45,10 @@ local function create_task(httpc, task_text, authHeader, sudoerToken)
|
||||
ngx.log(ngx.ERR, "TASK CREATE *FAILED*", res.body)
|
||||
|
||||
end
|
||||
-- 必须先显示设置ngx.status,因为ngx.say会默认设置status为200
|
||||
-- 后面再在ngx.exit里指定status就会出现冲突,报下面错误:
|
||||
-- attempt to set status 401 via ngx.exit after sending out the response status 200
|
||||
ngx.status = res.status
|
||||
ngx.say(res.body)
|
||||
|
||||
ngx.exit(res.status)
|
||||
|
||||
@@ -54,6 +54,7 @@ local function verifyJwtToken(httpc, token)
|
||||
else
|
||||
if 200 ~= res.status then
|
||||
ngx.log(ngx.ERR, "JWT TOKEN VERIFICATION *ERROR* -> ", err)
|
||||
ngx.status = res.status
|
||||
ngx.say(res.body)
|
||||
ngx.exit(res.status)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user