From c0fdcfc6bb4c7c73d82c876a17cd285602b45179 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 28 Jun 2025 10:46:30 +0200 Subject: [PATCH] Fix connections with ssl https://github.com/alexbelgium/hassio-addons/issues/1877#issuecomment-3010832728 --- portainer/rootfs/etc/nginx/templates/ingress.gtpl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/portainer/rootfs/etc/nginx/templates/ingress.gtpl b/portainer/rootfs/etc/nginx/templates/ingress.gtpl index ef36473c0..cd7d2cfd0 100644 --- a/portainer/rootfs/etc/nginx/templates/ingress.gtpl +++ b/portainer/rootfs/etc/nginx/templates/ingress.gtpl @@ -13,6 +13,9 @@ server { proxy_send_timeout 30m; proxy_read_timeout 30m; proxy_set_header Origin ""; + # Ensure the backend knows the correct host + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Host $http_host; } location /api/websocket/ { @@ -24,6 +27,9 @@ server { proxy_connect_timeout 30m; proxy_send_timeout 30m; proxy_read_timeout 30m; + # Ensure the backend knows the correct host + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Host $http_host; } }