Merge pull request #24 from fredrikbaberg/dev_octoprint

Correction to name of option trusted_proxies
This commit is contained in:
Fredrik Baberg 2022-12-20 13:02:19 +01:00 committed by GitHub
commit 9f3281d079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
- 2022.12.04
- Correction to name of option (trusted_proxies).
- 2022.12.03
- Add option for trusted proxies.

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint"
version: "2022.12.03"
version: "2022.12.04"
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"
@ -26,10 +26,10 @@ ports_description:
options:
camera_url: "http://b7aa59c4-camera-mjpg-streamer"
mode: normal
reverse_proxy: ""
trusted_proxies: ""
schema:
camera_url: "url?"
mode: "list(normal|recovery|reverse_proxy_test|camera)?"
reverse_proxy: "str?"
trusted_proxies: "str?"
tmpfs: true
image: ghcr.io/fredrikbaberg/addon-3dprinter-octoprint-{arch}

View File

@ -11,7 +11,7 @@ bashio::var.json \
ingress_entry "$(bashio::addon.ingress_entry)" \
camera_host "$(bashio::config 'camera_url')" \
mode "$(bashio::config 'mode')" \
reverse_proxy "$(bashio::config 'reverse_proxy')" \
trusted_proxies "$(bashio::config 'trusted_proxies')" \
| tempio \
-template /usr/share/tempio/caddy/Caddyfile.gtpl \
-out /etc/caddy/Caddyfile

View File

@ -42,7 +42,7 @@
:5000 {
reverse_proxy http://127.0.0.1:80 {
{{ if .trusted_proxies }}
trusted_proxies {{ .trusted_proxies }}
trusted_proxies "{{ .trusted_proxies }}"
{{ end }}
}
}