Skip to content

v1.0.7 - dashboard HA Ingress hardening

Choose a tag to compare

@WolframRavenwolf WolframRavenwolf released this 17 May 12:30
· 18 commits to main since this release

Fixes dashboard asset loading behind Home Assistant Ingress for modern Hermes dashboard builds.

Root cause:

  • v1.0.6 fixed the nginx reload/startup failure from v1.0.5, but issue #6 exposed a different path-prefix failure.
  • Modern upstream Hermes dashboards can rely on X-Forwarded-Prefix to derive HERMES_BASE_PATH and rewrite absolute Vite assets.
  • Home Assistant Ingress prefixes include a random token, e.g. /api/hassio_ingress/<token>/dashboard, which can exceed upstream Hermes' current prefix sanity limit.
  • When upstream dropped that long prefix, the dashboard HTML still loaded, but JS/CSS assets were requested from the wrong path and returned 404.

What changed:

  • Adds an add-on-controlled import.meta.url fallback for modern dashboard HERMES_BASE_PATH so API, plugin, router, and asset paths keep working even if upstream prefix handling rejects HA Ingress' long path.
  • Forces Vite to emit relative dashboard asset URLs with base: "./" for both modern and legacy dashboard sources.
  • Rebuilds stale dashboard bundles when index.html still contains absolute /assets/... JS/CSS references.
  • Keeps previous legacy dashboard compatibility patches and partial-patch repair behavior.
  • Updates the landing page so /v1/health is shown as optional API server health, not Gateway health.
  • Avoids polling /v1/health when the API server is disabled, preventing misleading nginx connect() failed log noise.
  • Bumps the add-on version to v1.0.7.

Verification:

  • python3 -m pytest -q → 13 passed
  • git diff --check → OK
  • python3 -m py_compile hermes_agent/dashboard-patches.py → OK
  • bash -n hermes_agent/run.sh → OK
  • Independent code review: PASS, no blocking findings

Thanks to @imcvampire for the full log and browser Network screenshot that made the remaining asset-path failure visible.