Skip to content

Commit b2414ae

Browse files
committed
don't allow if match path is missing
1 parent 78f09df commit b2414ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/proxy/token.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ func validateToken(token string, secret []byte, publicKey *rsa.PublicKey, apiPat
6060
matchMethod = ""
6161
}
6262
if matchPath, ok = claims["matchPath"].(string); !ok {
63-
matchPath = ""
63+
// Do not allow any request
64+
matchPath = "^$"
6465
}
6566
matchPathRegexp := regexp.MustCompile(matchPath)
6667

0 commit comments

Comments
 (0)