From 0b8be86415da1eef51cc34826f50147788995df6 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Mon, 4 Mar 2024 09:06:37 +0100 Subject: [PATCH] OnlyLang: require a path component for default ingress Previously, the default ingress would match where the home ingress should have matched, leading to a redirect to the default language with a slash at the enn (/ -> /de/). Make sure the home ingress matches, so that the redirect is correct (/ -> /de). --- .../cmcc/cmccoperator/ingress/OnlyLangUrlMappingBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/tsystemsmms/cmcc/cmccoperator/ingress/OnlyLangUrlMappingBuilder.java b/src/main/java/com/tsystemsmms/cmcc/cmccoperator/ingress/OnlyLangUrlMappingBuilder.java index a5f0477..69f6431 100644 --- a/src/main/java/com/tsystemsmms/cmcc/cmccoperator/ingress/OnlyLangUrlMappingBuilder.java +++ b/src/main/java/com/tsystemsmms/cmcc/cmccoperator/ingress/OnlyLangUrlMappingBuilder.java @@ -100,7 +100,7 @@ public Collection buildLiveResources(SiteMapping siteMapp ingresses.addAll(ingressBuilderFactory.builder(targetState, liveName(site, "default", suffix), fqdn, tls) .responseTimeout(responseTimeout) .uploadSize(uploadSize) - .pathPattern("/(.*)", serviceName) + .pathPattern("/(.+)", serviceName) .redirect("$scheme://" + fqdn + "/" + getLanguage(siteMapping.getPrimarySegment()) + "/$1", HttpStatus.MOVED_PERMANENTLY.value()).build()); ingresses.addAll(ingressBuilderFactory.builder(targetState, liveName(site, "seo", suffix), fqdn, tls) .responseTimeout(responseTimeout)