chore: faceback white list
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / analysis (push) Successful in 0s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 1s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 1s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 0s
CI / task (push) Successful in 1s
CI / wecom (push) Successful in 0s
CI / water (push) Successful in 1s
CI / ws (push) Successful in 0s

This commit is contained in:
zzw
2026-10-27 14:52:05 +08:00
parent ea3f88d0e8
commit 32226e2fa9
2 changed files with 19 additions and 19 deletions
+13 -14
View File
@@ -33,18 +33,17 @@ const (
CtxGroupId ctxKey = "X-Group-Id"
CtxGroupName ctxKey = "X-Group-Name"
CtxUserType ctxKey = "X-User-Type"
CtxBizId ctxKey = "X-Biz-Id"
CtxRawBody ctxKey = "X-Raw-Body"
CtxOssAuth ctxKey = "X-Oss-Authorization"
CtxOssPubKeyURL ctxKey = "X-Oss-Pub-Key-Url"
CtxRequestPath ctxKey = "X-Request-Path"
CtxRequestQuery ctxKey = "X-Request-Query"
CtxBizId ctxKey = "X-Biz-Id"
CtxRawBody ctxKey = "X-Raw-Body"
CtxOssAuth ctxKey = "X-Oss-Authorization"
CtxOssPubKeyURL ctxKey = "X-Oss-Pub-Key-Url"
CtxRequestPath ctxKey = "X-Request-Path"
CtxRequestQuery ctxKey = "X-Request-Query"
)
var callbackPrefixes = []string{
"/api/v3/express/",
"/api/v2/analysis/oss/callback",
"/api/v2/analysis/py/callback",
"/api/v3/other1/",
"/api/v3/other2/",
}
@@ -66,13 +65,13 @@ type UserInfo struct {
StoreName string
GroupId string
GroupName string
BizId string
RawBody string
OssAuth string
OssPubKeyURL string
RequestPath string
RequestQuery string
Valid bool
BizId string
RawBody string
OssAuth string
OssPubKeyURL string
RequestPath string
RequestQuery string
Valid bool
}
func GetUserInfo(ctx context.Context) UserInfo {
+6 -5
View File
@@ -22,8 +22,10 @@ function _M.access(conf, ctx)
["/api/v3/express/sf"] = true,
["/api/v3/express/jd"] = true,
["/api/v3/chore/oss/upload"] = true,
["/api/v1/oss/callback"] = true,
["/api/v3/chore/oss/upload"] = true,
["/api/v3/chore/answer/items"] = true,
["/api/v3/chore/system/info"] = true,
["/api/v3/chore/system/items"] = true,
["/api/v3/user/qrcode/generate"] = true,
["/api/v3/user/qrcode/scan"] = true,
@@ -33,10 +35,9 @@ function _M.access(conf, ctx)
["/api/v2/analysis/qrcode/info"] = true,
["/api/v2/analysis/user/delete"] = true,
["/api/v2/analysis/store/info"] = true,
["/api/v2/analysis/oss/callback"] = true,
["/api/v2/analysis/py/callback"] = true,
["/api/v3/chore/answer/items"] = true,
["/api/v3/chore/system/info"] = true,
["/api/v3/chore/system/items"] = true,
}
local user_key = core.request.header(ctx, "authorization")