diff --git a/teddycloud/config.yaml b/teddycloud/config.yaml index 787313d..75e673f 100644 --- a/teddycloud/config.yaml +++ b/teddycloud/config.yaml @@ -6,6 +6,7 @@ description: An alternative server for your Toniebox url: https://github.com/mrueg/addon-teddycloud ingress: true ingress_stream: true +ingress_entry: web/ panel_icon: mdi:teddy-bear image: ghcr.io/mrueg/teddycloud/{arch} arch: diff --git a/teddycloud/rootfs/etc/nginx/servers/ingress.conf b/teddycloud/rootfs/etc/nginx/servers/ingress.conf index 08de9d2..76dd1af 100644 --- a/teddycloud/rootfs/etc/nginx/servers/ingress.conf +++ b/teddycloud/rootfs/etc/nginx/servers/ingress.conf @@ -29,6 +29,17 @@ server { allow 172.30.32.2; deny all; + # Serve the web UI as .../web/ (with trailing slash). At .../web the browser's + # preload scanner resolves the relative asset URLs against the ingress root + # before the UI's inline script sets , which logs failed requests. + location = / { + return 302 $http_x_ingress_path/web/; + } + + location = /web { + return 302 $http_x_ingress_path/web/$is_args$args; + } + location / { proxy_set_header Origin ""; # The backend redirects / to /web; keep that redirect inside the ingress path.