From ee5f440a7f519040a5ce586e4197a712538cbce9 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Wed, 5 Oct 2022 00:03:59 +0200 Subject: [PATCH] Modify Caddyfile for Ingress --- 3dprinter-octoprint/config.yaml | 2 +- .../rootfs/usr/share/tempio/Caddyfile.ingress.gtpl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/3dprinter-octoprint/config.yaml b/3dprinter-octoprint/config.yaml index 10663e1..c4abace 100644 --- a/3dprinter-octoprint/config.yaml +++ b/3dprinter-octoprint/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-OctoPrint" -version: "2022.9.029" +version: "2022.9.030" slug: "3dprinter-octoprint" description: "OctoPrint as an addon, no additional bells and whistles." url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint" diff --git a/3dprinter-octoprint/rootfs/usr/share/tempio/Caddyfile.ingress.gtpl b/3dprinter-octoprint/rootfs/usr/share/tempio/Caddyfile.ingress.gtpl index ab095bb..0410c74 100644 --- a/3dprinter-octoprint/rootfs/usr/share/tempio/Caddyfile.ingress.gtpl +++ b/3dprinter-octoprint/rootfs/usr/share/tempio/Caddyfile.ingress.gtpl @@ -2,9 +2,10 @@ @ingress { remote_ip 172.30.32.2 } - handle_path {http.request.header.X-Ingress-Path}/* { + handle { + uri strip_prefix {{ .ingress_entry }} reverse_proxy @ingress 127.0.0.1:5000 { - header_up X-Script-Name {http.request.header.X-Ingress-Path}/ + header_up X-Script-Name {{ .ingress_entry }} header_up -Origin header_up Origin 172.30.32.2 header_up X-Forwarded-For 172.30.32.2