Camera improvements (#94)
* Add option to set camera url * Update proxy configuration for camera * Update 3Dprinter-OctoPrint camera documentation; add reverse proxy option.
This commit is contained in:
@@ -9,6 +9,7 @@ bashio::var.json \
|
||||
addon_hostname "$(bashio::addon.hostname)" \
|
||||
addon_ip "$(bashio::addon.ip_address)" \
|
||||
trusted_proxies "$(bashio::config 'trusted_proxies')" \
|
||||
camera_url "$(bashio::config 'camera_url')" \
|
||||
| tempio \
|
||||
-template /usr/share/tempio/caddy/Caddyfile.internal_external.gtpl \
|
||||
-out /etc/caddy/sites-enabled/internal_external.caddy
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
# * Home-Assistant OctoPrint integration.
|
||||
# * Accessing OctoPrint WebUI through external port.
|
||||
:5000 {
|
||||
{{ if .camera_url }}
|
||||
handle_path /camera* {
|
||||
reverse_proxy {{ .camera_url }} {
|
||||
trusted_proxies {{ .trusted_proxies }}
|
||||
flush_interval -1
|
||||
}
|
||||
}
|
||||
{{ end }}
|
||||
reverse_proxy http://127.0.0.1:80 {
|
||||
trusted_proxies {{ .trusted_proxies }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user