return HtyResponse format for upt
This commit is contained in:
+5
-1
@@ -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}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user