Repository navigation
Open the web UI at web/ to avoid failed asset preloads - #48
Merged
Merged
Conversation
At .../web (no trailing slash) the browser's preload scanner resolves the UI's relative asset URLs against the ingress root before the inline script sets <base href>, so every page load logs a 404 for <ingress>/assets/... (the real requests then succeed). Open the panel at web/ via ingress_entry and redirect / and /web to web/ in nginx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With TeddyCloud 0.7.1, every page load through ingress logs errors like these, although the UI works:
The panel opens
<ingress>/and TeddyCloud redirects to/web(no trailing slash). The UI's assets are relative (./assets/...), and an inline script sets<base href>to<prefix>/web/. The browser's preload scanner fetches the assets before that script runs, and resolves them against.../web, which gives<ingress>/assets/...and a 404. The real requests then go to.../web/assets/...and succeed.At
.../web/the relative URLs resolve correctly even without<base>, so:ingress_entry: web/makes Home Assistant open the panel there directly./and/web(keeping the query string, e.g. the UI's?v=reload) to<ingress>/web/.The same noise happens with direct access to
http://<host>/web. That comes from TeddyCloud's own/→/webredirect and should also be fixed upstream.Test plan
Locally: the add-on image behind a front proxy that strips
/api/hassio_ingress/TOKENand setsX-Ingress-Path, like the Supervisor..../webin headless Firefox and Chrome: a 404 for<ingress>/assets/..., then 200 for<ingress>/web/assets/.../,/weband/web?v=abcredirect to<ingress>/web/(query kept), and loading the ingress root in both browsers makes no failing requestsnginx -tpasses.../web/with a clean console🤖 Generated with Claude Code