1234567891011121314151617181920212223 |
- --
- -- Created by IntelliJ IDEA.
- -- User: Bear
- -- Date: 2019/4/30
- -- Time: 下午4:05
- -- To change this template use File | Settings | File Templates.
- --
- lfs=require("lfs")
- expire_time = 10
- appid = string.match(ngx.var.request_uri, "/api/wechat/mpapi/appid/(%w+)")
- if not appid then
- return
- end
- attr = lfs.attributes("/tmp/TPL_CALLBACK_" .. appid)
- if type(attr) == "table" and os.time() - attr.change < expire_time then
- ngx.say("")
- ngx.exit(200)
- end
|