2022-07-16 23:16:00 +08:00
|
|
|
local uri = ngx.unescape_uri(ngx.var.arg_uri)
|
2022-07-16 03:07:37 +08:00
|
|
|
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)
|