Fix getObject() bug for some API

This commit is contained in:
Yang Luo
2023-05-21 11:07:01 +08:00
parent de2689ac39
commit c84150cede

View File

@ -125,7 +125,11 @@ func AuthzFilter(ctx *context.Context) {
subOwner, subName := getSubject(ctx) subOwner, subName := getSubject(ctx)
method := ctx.Request.Method method := ctx.Request.Method
urlPath := getUrlPath(ctx.Request.URL.Path) urlPath := getUrlPath(ctx.Request.URL.Path)
objOwner, objName := getObject(ctx)
objOwner, objName := "", ""
if urlPath != "/api/get-app-login" {
objOwner, objName = getObject(ctx)
}
if strings.HasPrefix(urlPath, "/api/notify-payment") { if strings.HasPrefix(urlPath, "/api/notify-payment") {
urlPath = "/api/notify-payment" urlPath = "/api/notify-payment"