Update common.lua

pull/216/head
midoks 3 years ago
parent 444ff40570
commit 6555d927ea
  1. 5
      plugins/op_waf/waf/lua/common.lua

@ -179,18 +179,13 @@ end
function _M.return_message(self, status, msg)
ngx.header.content_type = "application/json"
self:D("return_message:"..tostring(status)..tostring(msg))
local data = self:return_state(status, msg)
self:D("return_message[data]:"..tostring(data))
ngx.say(json.encode(data))
ngx.exit(200)
end
function _M.return_html(self, status, html)
ngx.header.content_type = "text/html"
ngx.status = status
ngx.say(html)
ngx.exit(status)
end

Loading…
Cancel
Save