mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-05 00:24:58 +02:00
13 lines
636 B
Plaintext
13 lines
636 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%%/"';
|