Add camera mode

This commit is contained in:
Fredrik Baberg 2022-12-12 00:03:55 +01:00
parent ebed42aa86
commit 2757b3ca6d
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint" name: "3DPrinter-OctoPrint"
version: "2022.12.0" version: "2022.12.01"
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"
@ -28,5 +28,5 @@ options:
mode: normal mode: normal
schema: schema:
camera_url: "url?" camera_url: "url?"
mode: "list(normal|recovery|reverse_proxy_test)?" mode: "list(normal|recovery|reverse_proxy_test|camera)?"
tmpfs: true tmpfs: true

View File

@ -22,6 +22,8 @@
rewrite / /recovery rewrite / /recovery
{{ else if eq .mode "reverse_proxy_test" }} {{ else if eq .mode "reverse_proxy_test" }}
rewrite / /reverse_proxy_test rewrite / /reverse_proxy_test
{{ else if eq .mode "camera" }}
rewrite / /camera
{{ end }} {{ end }}
reverse_proxy @ingress 127.0.0.1:80 { reverse_proxy @ingress 127.0.0.1:80 {
header_up X-Script-Name {{ .ingress_entry }} header_up X-Script-Name {{ .ingress_entry }}