diff --git a/bazarr/CHANGELOG.md b/bazarr/CHANGELOG.md index 11630808d2..10249b94b1 100644 --- a/bazarr/CHANGELOG.md +++ b/bazarr/CHANGELOG.md @@ -1,4 +1,9 @@ +## 1.6.0.1 (2026-07-27) + +- Fix ingress: nginx rewrote Bazarr's redirects into an absolute `http://:8099/...` URL, which the browser blocked as mixed content when Home Assistant is served over HTTPS. Redirects now stay relative and point at the ingress path +- Fix fallback base_url in the nginx service script missing its leading `/`, which crashed Bazarr on startup + ## 1.6.0 (2026-07-08) - Update to latest version from linuxserver/docker-bazarr (changelog : https://github.com/linuxserver/docker-bazarr/releases) diff --git a/bazarr/config.yaml b/bazarr/config.yaml index 74363800e6..0ad56e4885 100644 --- a/bazarr/config.yaml +++ b/bazarr/config.yaml @@ -112,4 +112,4 @@ schema: slug: bazarr_nas udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/bazarr -version: "1.6.0" +version: "1.6.0.1" diff --git a/bazarr/rootfs/etc/nginx/servers/ingress.conf b/bazarr/rootfs/etc/nginx/servers/ingress.conf index 95f57fca46..01eb1ab00f 100644 --- a/bazarr/rootfs/etc/nginx/servers/ingress.conf +++ b/bazarr/rootfs/etc/nginx/servers/ingress.conf @@ -19,6 +19,19 @@ server { proxy_set_header Connection $http_connection; #auth_basic off; + # Adjust Location headers in backend redirects + # Bazarr is Flask-based and answers /bazarr with a redirect to /bazarr/, + # made absolute against the Host nginx sends upstream, so it reads + # http://127.0.0.1:6767/bazarr/. proxy_redirect strips that prefix, and + # nginx then re-absolutises the result as $scheme://$host:$server_port/... + # i.e. http://:8099/bazarr/ -- blocked by the browser as mixed + # content inside the ingress iframe. absolute_redirect off keeps it + # relative; the proxy_redirect rules re-prefix it with the ingress entry + # (the second rule also covers a redirect that was relative already). + absolute_redirect off; # Do not add port to redirect + proxy_redirect http://127.0.0.1:6767/ %%ingress_entry%%/; + proxy_redirect / %%ingress_entry%%/; + # Correct base_url proxy_set_header Accept-Encoding ""; sub_filter_once off; diff --git a/bazarr/rootfs/etc/services.d/nginx/run b/bazarr/rootfs/etc/services.d/nginx/run index 94c657e39c..daf1d3739b 100644 --- a/bazarr/rootfs/etc/services.d/nginx/run +++ b/bazarr/rootfs/etc/services.d/nginx/run @@ -15,9 +15,10 @@ bashio::net.wait_for "$port" localhost 900 if [ -f "$CONFIG_LOCATION" ]; then if ! bashio::config.true "ingress_disabled"; then if ! bashio::config.has_value "connection_mode" || [ "$(bashio::config 'connection_mode')" != "noingress_auth" ]; then - if ! grep -q "base_url.*$slug" "$CONFIG_LOCATION"; then + if ! grep -q "base_url: /$slug" "$CONFIG_LOCATION"; then bashio::log.warning "BaseUrl not set properly, restarting" - sed -i "s/ base_url:.*/ base_url: $slug/" "$CONFIG_LOCATION" + # Must start with / for Flask blueprint registration + sed -i "s| base_url:.*| base_url: /$slug|" "$CONFIG_LOCATION" bashio::addon.restart fi fi