Merge pull request #11 from fredrikbaberg/dev

Update ingress config
This commit is contained in:
Fredrik Baberg 2022-07-11 14:14:32 +02:00 committed by GitHub
commit 3cfde6e0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint" name: "3DPrinter-OctoPrint"
version: "2022.7.001" version: "2022.7.002"
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

@ -8,6 +8,7 @@
bashio::var.json \ bashio::var.json \
interface "$(bashio::addon.ip_address)" \ interface "$(bashio::addon.ip_address)" \
port "^$(bashio::addon.ingress_port)" \ port "^$(bashio::addon.ingress_port)" \
ingress_entry "$(bashio::addon.ingress_entry)" \
| tempio \ | tempio \
-template /etc/nginx/templates/ingress.gtpl \ -template /etc/nginx/templates/ingress.gtpl \
-out /etc/nginx/servers/ingress.conf -out /etc/nginx/servers/ingress.conf

View File

@ -4,10 +4,11 @@ server {
include /etc/nginx/includes/server_params.conf; include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf; include /etc/nginx/includes/proxy_params.conf;
location / { location {{ .ingress_entry }} {
allow 172.30.32.2; allow 172.30.32.2;
deny all; deny all;
proxy_pass http://backend; proxy_pass http://backend;
proxy_set_header X-Script-Name {{ .ingress_entry }}
} }
} }