Skip to content

Commit

Permalink
test proxy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lmagyar authored and frenck committed Oct 15, 2023
1 parent 92122ba commit dae9546
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tailscale/rootfs/etc/s6-overlay/s6-rc.d/proxy/run
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ if bashio::var.true "$(bashio::core.ssl)"; then
bashio::exit.nok
fi

# Test Home Assistant's HTTP reverse proxy configuration
if (( 200 != $(curl -s -o /dev/null -w "%{http_code}" "http://127.0.0.1:$(bashio::core.port)" -H "X-Forwarded-For: 127.0.0.1") )); then
bashio::log.error "Unable to connect to Home Assistant on http://127.0.0.1:$(bashio::core.port)"
bashio::log.error "Please check your configuration based on the add-on's Documentation under \"Option: proxy\""
bashio::exit.nok
fi

# Set up proxy
# Note: Configuration is persistent between reboots, though configuring the same value won't cause duplicate entries,
# but will overwite previous entry if core.port has been changed
Expand Down

0 comments on commit dae9546

Please sign in to comment.