Skip to content

Commit

Permalink
🚑 Fixes direct access to the web interface
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Apr 16, 2019
1 parent bf1c760 commit 52d99e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions influxdb/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# Community Hass.io Add-ons: InfluxDB
# Configures NGINX for use with the Chronograf
# ==============================================================================
declare admin_port
declare port
declare certfile
declare ingress_interface
declare ingress_port
declare ingress_entry
declare keyfile

admin_port=$(bashio::addon.port 80)
port=$(bashio::addon.port 80)
ingress_entry=$(bashio::addon.ingress_entry)
if bashio::var.has_value "${admin_port}"; then
if bashio::var.has_value "${port}"; then
bashio::config.require.ssl

if bashio::config.true 'ssl'; then
Expand All @@ -27,7 +27,6 @@ if bashio::var.has_value "${admin_port}"; then
mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf
fi

sed -i "s/%%port%%/${admin_port}/g" /etc/nginx/servers/direct.conf
sed -i "s#%%ingress_entry%%#${ingress_entry}#g" /etc/nginx/servers/direct.conf
fi

Expand Down
2 changes: 1 addition & 1 deletion influxdb/rootfs/etc/nginx/servers/direct-ssl.disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen %%port%% default_server ssl http2;
listen 80 default_server ssl http2;

include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/ssl_params.conf;
Expand Down
2 changes: 1 addition & 1 deletion influxdb/rootfs/etc/nginx/servers/direct.disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen %%port%% default_server;
listen 80 default_server;

include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf;
Expand Down

0 comments on commit 52d99e8

Please sign in to comment.