mirror of
https://github.com/containous/traefik.git
synced 2025-10-09 23:33:21 +03:00
Allow empty path with App-root annotation
This commit is contained in:
committed by
Traefiker Bot
parent
ee19e66aba
commit
4db0dd9a7f
@@ -939,7 +939,7 @@ func loadAuthTLSSecret(namespace, secretName string, k8sClient Client) (string,
|
||||
func getFrontendRedirect(i *extensionsv1beta1.Ingress, baseName, path string) *types.Redirect {
|
||||
permanent := getBoolValue(i.Annotations, annotationKubernetesRedirectPermanent, false)
|
||||
|
||||
if appRoot := getStringValue(i.Annotations, annotationKubernetesAppRoot, ""); appRoot != "" && path == "/" {
|
||||
if appRoot := getStringValue(i.Annotations, annotationKubernetesAppRoot, ""); appRoot != "" && (path == "/" || path == "") {
|
||||
return &types.Redirect{
|
||||
Regex: fmt.Sprintf("%s$", baseName),
|
||||
Replacement: fmt.Sprintf("%s/%s", strings.TrimRight(baseName, "/"), strings.TrimLeft(appRoot, "/")),
|
||||
|
Reference in New Issue
Block a user