Modify Caddyfile for Ingress

This commit is contained in:
Fredrik Baberg 2022-10-05 00:03:59 +02:00
parent f6484bdc2d
commit ee5f440a7f
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint" name: "3DPrinter-OctoPrint"
version: "2022.9.029" version: "2022.9.030"
slug: "3dprinter-octoprint" slug: "3dprinter-octoprint"
description: "OctoPrint as an addon, no additional bells and whistles." description: "OctoPrint as an addon, no additional bells and whistles."
url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint" url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint"

View File

@ -2,9 +2,10 @@
@ingress { @ingress {
remote_ip 172.30.32.2 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 { 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
header_up Origin 172.30.32.2 header_up Origin 172.30.32.2
header_up X-Forwarded-For 172.30.32.2 header_up X-Forwarded-For 172.30.32.2