From 81266d4ef9189acdad8be7d2149a1c3a6c5c834e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 2 Aug 2023 20:03:42 -0500 Subject: [PATCH] home-assistant: Use subdomain for Zigbee/Z-wave UI Having the Z-Wave and Zigbee admin interfaces exposed as sub-paths under *homeassistant.pyrocufflink.blue* made it difficult to use Authelia. Since I have a Firefox container tab specifically for Home Assistant, the login redirect would open a new tab in a different container, since Authelia is hosted at *auth.pyrocufflink.blue*. In order to log in, I would have to temporarily disable "designated sites only" for the Home Assistant tab container. Using subdomains for the admin interfaces avoids this issue, since I can use a different container for them, one that does not have the "designated sites only" setting, since I am less worried about accidentally leaking data to sites on the Internet from them. --- home-assistant/ingress.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/home-assistant/ingress.yaml b/home-assistant/ingress.yaml index 0c504bd..5cd2950 100644 --- a/home-assistant/ingress.yaml +++ b/home-assistant/ingress.yaml @@ -39,15 +39,14 @@ metadata: nginx.ingress.kubernetes.io/auth-response-headers: Remote-User,Remote-Name,Remote-Groups,Remote-Email nginx.ingress.kubernetes.io/auth-snippet: | proxy_set_header X-Forwarded-Method $request_method; - nginx.ingress.kubernetes.io/use-regex: 'true' - nginx.ingress.kubernetes.io/rewrite-target: /$1 + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" spec: ingressClassName: nginx rules: - - host: homeassistant.pyrocufflink.blue + - host: zigbee.pyrocufflink.blue http: paths: - - path: /zigbee/(.*) + - path: / pathType: Prefix backend: service: @@ -72,17 +71,14 @@ metadata: nginx.ingress.kubernetes.io/auth-response-headers: Remote-User,Remote-Name,Remote-Groups,Remote-Email nginx.ingress.kubernetes.io/auth-snippet: | proxy_set_header X-Forwarded-Method $request_method; - nginx.ingress.kubernetes.io/use-regex: 'true' - nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/configuration-snippet: | - proxy_set_header X-External-Path /zwave; + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" spec: ingressClassName: nginx rules: - - host: homeassistant.pyrocufflink.blue + - host: zwave.pyrocufflink.blue http: paths: - - path: /zwave/(.*) + - path: / pathType: Prefix backend: service: