Skip to content

Commit

Permalink
OnlyLang: require a path component for default ingress
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Stefan Bethke committed Mar 4, 2024
1 parent 17cfc95 commit 0b8be86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public Collection<? extends HasMetadata> 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)
Expand Down

0 comments on commit 0b8be86

Please sign in to comment.