mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Ingress addition
This commit is contained in:
@@ -13,3 +13,4 @@ ingress_entry=$(bashio::addon.ingress_entry)
|
||||
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s|%%ingress_entry2%%|${ingress_entry////\\/}|g" /etc/nginx/servers/ingress.conf
|
||||
|
||||
@@ -6,15 +6,9 @@
|
||||
###############
|
||||
|
||||
# Set UrlBase
|
||||
#if ! grep -q "hassioautobrr" /config/addons_config/autobrr/config.toml; then
|
||||
# bashio::log.warning "BaseUrl not set properly, restarting"
|
||||
# sed -i "/baseUrl/d" /config/addons_config/autobrr/config.toml
|
||||
# sed -i "/# Base url/a baseUrl = \"\/hassioautobrr\/\"" /config/addons_config/autobrr/config.toml
|
||||
# bashio::addon.restart
|
||||
#fi
|
||||
|
||||
#bashio::log.info "Starting NGinx..."
|
||||
#nginx & true
|
||||
bashio::log.info "Starting NGinx..."
|
||||
nginx & true
|
||||
|
||||
#############
|
||||
# Start app #
|
||||
|
||||
@@ -11,19 +11,20 @@ server {
|
||||
proxy_connect_timeout 30m;
|
||||
proxy_send_timeout 30m;
|
||||
proxy_read_timeout 30m;
|
||||
proxy_pass http://127.0.0.1:7474;
|
||||
proxy_pass http://0.0.0.0:7474;
|
||||
|
||||
# Allow signalr
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
#auth_basic off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
|
||||
# Correct base_url
|
||||
proxy_set_header Accept-Encoding "";
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter /hassioautobrr %%ingress_entry%%/hassioautobrr;
|
||||
sub_filter 'href="/"' 'href="%%ingress_entry%%/"';
|
||||
sub_filter '"\/"' '"%%ingress_entry2%%\/"';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user