mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-03 23:54:55 +02:00
Upstream 0.6.3 consolidates deployment-path handling into a single
<base href> declaration in index.html with Vite base: './' and
relative paths for all internal URLs. The previous seven sub_filter
rules (href/src/'/api'/'/socket.io') are no longer needed — one
<base href> replacement is sufficient.
Also removes the incidental brittleness from byte-level sub_filter
matches in minified JS bundles (the '/stream/' rule inadvertently
double-prefixed the literal 'api.get("/stream/config")' string).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
635 B
Plaintext
13 lines
635 B
Plaintext
absolute_redirect off;
|
|
rewrite ^%%ingress_entry%%/(.*)$ /$1 break;
|
|
sub_filter_once on;
|
|
sub_filter_types text/html;
|
|
|
|
# Rewrite the frontend's default <base href="/" /> to the ingress prefix so
|
|
# all relative URLs (assets, axios baseURL, socket.io path) resolve under
|
|
# ingress. The frontend declares BASE once via this tag; no other rewrites
|
|
# are needed. Pattern deliberately omits the closing bracket so it matches
|
|
# both self-closing (<base href="/" />) and non-self-closing (<base href="/">)
|
|
# forms. sub_filter_once above ensures only the first occurrence is touched.
|
|
sub_filter '<base href="/"' '<base href="%%ingress_entry%%/"';
|