return HtyResponse format for upt

This commit is contained in:
2022-09-04 00:52:00 +08:00
parent 7a10e31bfa
commit b9b01d7fd8
+5 -1
View File
@@ -3,6 +3,10 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
--todo: add verify
local Upt = require("lib.upt")
local cjson = require "cjson"
local uri = ngx.unescape_uri(ngx.var.arg_uri)
ngx.log(ngx.INFO, 'URI -> ' .. uri)
ngx.say(Upt.upt(uri))
ngx.say(cjson.encode({r = true, d = Upt.upt(uri), e = nil}))