Update ingress config

This commit is contained in:
Fredrik Baberg 2022-07-11 14:09:04 +02:00
parent bb4f67ecba
commit 99683a7bd4
3 changed files with 4 additions and 2 deletions

View File

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

View File

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

View File

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