From d765ade2695856a1d14679adefb57cba1fdffb85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Goinvic?= Date: Fri, 28 Feb 2025 10:44:21 +0100 Subject: [PATCH] tpl ingress.host in the well known redirect --- charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl | 2 +- newsfragments/240.internal.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragments/240.internal.md diff --git a/charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl b/charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl index 41275a71..1797a8ea 100644 --- a/charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl +++ b/charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl @@ -22,7 +22,7 @@ frontend well-known-in {{- if $root.Values.elementWeb.enabled }} {{- with $root.Values.elementWeb }} {{- $elementWebHttps := include "element-io.ess-library.ingress.tlsSecret" (dict "root" $root "context" (dict "hosts" (list (required "elementWeb.ingress.host is required" .ingress.host)) "tlsSecret" .ingress.tlsSecret "ingressName" "element-web")) }} - http-request redirect code 301 location http{{ if $elementWebHttps }}s{{ end }}://{{ .ingress.host }} unless well-known + http-request redirect code 301 location http{{ if $elementWebHttps }}s{{ end }}://{{ tpl .ingress.host $root }} unless well-known {{- end }} {{- else if .baseDomainRedirect.url }} http-request redirect code 301 location {{ .baseDomainRedirect.url }} unless well-known diff --git a/newsfragments/240.internal.md b/newsfragments/240.internal.md new file mode 100644 index 00000000..663ca485 --- /dev/null +++ b/newsfragments/240.internal.md @@ -0,0 +1 @@ +Allow to call tpl in well-known .ingress.host elementWeb redirect.