-------------------------main.lua start----------------------------- local redisutils = require("redisutils") local controller = require("controller") local red = redisutils.redisClient() local params = ngx.req.get_uri_args() local userId = params.userId
if red then local is_grayscale = controller.checkUserId(red, userId) if is_grayscale then ngx.var.default_stream = ngx.var.grayscale_stream end redisutils.closeRedis(red) end -------------------------main.lua end-----------------------------