feat: analysis user auth and ws

This commit is contained in:
zzw
2026-10-15 09:23:07 +08:00
parent 6fa185003d
commit a65b6d2803
102 changed files with 4966 additions and 786 deletions
+10 -2
View File
@@ -24,7 +24,12 @@ function _M.access(conf, ctx)
["/api/v3/chore/oss/upload"] = true,
["/api/v2/analysis/qrcode/generate"] = true,
["/api/v3/user/qrcode/generate"] = true,
["/api/v3/user/qrcode/scan"] = true,
["/api/v2/analysis/agreement/info"] = true,
["/api/v2/analysis/switch"] = true,
["/api/v2/analysis/user/delete"] = true,
}
local user_key = core.request.header(ctx, "authorization")
@@ -71,7 +76,7 @@ function _M.access(conf, ctx)
end
local res, err = red:get(redis_key)
core.log.error("AUTH_DEBUG host=", redis_host,
core.log.info("AUTH_DEBUG host=", redis_host,
" port=", redis_port,
" password=", redis_password,
" db=", redis_db,
@@ -143,6 +148,9 @@ function _M.access(conf, ctx)
if json.client_code then
ngx.req.set_header("X-Client-Code", tostring(json.client_code))
end
if json.biz_id then
ngx.req.set_header("X-Biz-Id", tostring(json.biz_id))
end
end
ngx.req.set_header("X-Refresh", refresh or "")