8 lines
315 B
Lua
8 lines
315 B
Lua
|
|
local uri = ngx.var.arg_uri
|
||
|
|
local secret = ngx.var.upt_secret
|
||
|
|
local duration = ngx.var.upt_duration
|
||
|
|
local etime = os.time() + duration
|
||
|
|
local sign = ngx.md5(secret .. '&' .. etime .. '&' .. uri)
|
||
|
|
ngx.log(ngx.ERR, 'sign...' .. sign .. ' etime..' .. etime)
|
||
|
|
local upt = string.sub(sign, 13, 13 + 7) .. etime
|
||
|
|
ngx.say(upt)
|