v1.0.7 - dashboard HA Ingress hardening
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-Prefixto deriveHERMES_BASE_PATHand 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.urlfallback for modern dashboardHERMES_BASE_PATHso 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.htmlstill contains absolute/assets/...JS/CSS references. - Keeps previous legacy dashboard compatibility patches and partial-patch repair behavior.
- Updates the landing page so
/v1/healthis shown as optional API server health, not Gateway health. - Avoids polling
/v1/healthwhen the API server is disabled, preventing misleading nginxconnect() failedlog noise. - Bumps the add-on version to v1.0.7.
Verification:
python3 -m pytest -q→ 13 passedgit diff --check→ OKpython3 -m py_compile hermes_agent/dashboard-patches.py→ OKbash -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.