From 2ca1f926978a7560c0570ac59d856575d127af2f Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Thu, 12 Nov 2020 13:42:12 -0300 Subject: [PATCH] Add PathType details in external auth location --- internal/ingress/controller/template/template.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index f806130c9..639055363 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -427,7 +427,13 @@ func buildAuthLocation(input interface{}, globalExternalAuthURL string) string { str := base64.URLEncoding.EncodeToString([]byte(location.Path)) // removes "=" after encoding str = strings.Replace(str, "=", "", -1) - return fmt.Sprintf("/_external-auth-%v", str) + + pathType := "default" + if location.PathType != nil { + pathType = fmt.Sprintf("%v", *location.PathType) + } + + return fmt.Sprintf("/_external-auth-%v-%v", str, pathType) } // shouldApplyGlobalAuth returns true only in case when ExternalAuth.URL is not set and