feat: Add wildcard auth middleware paths (#24)
* chore: add concurrent route health check requests * feat: Add wildcard auth middleware paths * fix: bind privileged port permission denied on Kubernetes for nonroot user
This commit is contained in:
@@ -82,3 +82,17 @@ func ParseURLPath(urlPath string) string {
|
||||
}
|
||||
return urlPath
|
||||
}
|
||||
|
||||
func ParseRoutePath(path, blockedPath string) string {
|
||||
basePath := ParseURLPath(path)
|
||||
switch {
|
||||
case blockedPath == "":
|
||||
return basePath
|
||||
case strings.HasSuffix(blockedPath, "/*"):
|
||||
return basePath + blockedPath[:len(blockedPath)-2]
|
||||
case strings.HasSuffix(blockedPath, "*"):
|
||||
return basePath + blockedPath[:len(blockedPath)-1]
|
||||
default:
|
||||
return basePath + blockedPath
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user