Skip to content

Open the web UI at web/ to avoid failed asset preloads - #48

Merged
mrueg merged 1 commit into
mainfrom
ingress-web-slash
Nov 11, 2026
Merged

mrueg merged 1 commit into
mainfrom
ingress-web-slash

Conversation

@mrueg

@mrueg mrueg commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

With TeddyCloud 0.7.1, every page load through ingress logs errors like these, although the UI works:

GET <ingress>/assets/index-CY8pQpRN.js  NS_ERROR_CORRUPTED_CONTENT
GET <ingress>/assets/index-6Bqauc48.css [404]
Loading module from "<ingress>/assets/index-CY8pQpRN.js" was blocked because of a disallowed MIME type ("text/html").

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.
  • nginx redirects / 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 / → /web redirect and should also be fixed upstream.

Test plan

Locally: the add-on image behind a front proxy that strips /api/hassio_ingress/TOKEN and sets X-Ingress-Path, like the Supervisor.

  • Reproduced the errors at .../web in headless Firefox and Chrome: a 404 for <ingress>/assets/..., then 200 for <ingress>/web/assets/...
  • With this change, /, /web and /web?v=abc redirect to <ingress>/web/ (query kept), and loading the ingress root in both browsers makes no failing requests
  • UI renders under the ingress prefix (Chrome screenshot), and nginx -t passes
  • Panel in Home Assistant opens at .../web/ with a clean console

🤖 Generated with Claude Code

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>
@mrueg mrueg added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Nov 11, 2026
@mrueg
mrueg merged commit 0c381d0 into main Nov 11, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant