diff --git a/calibre_web/CHANGELOG.md b/calibre_web/CHANGELOG.md index 6ebb9f219e..d141a80703 100644 --- a/calibre_web/CHANGELOG.md +++ b/calibre_web/CHANGELOG.md @@ -1,4 +1,7 @@ - Migrate legacy add-on configuration map names to current app configuration terminology. + +## 0.6.27.5 (2026-09-19) +- New: optional `login_with_ha_user` option. When enabled, Ingress logs you into calibre-web as your Home Assistant username, which the Supervisor forwards with every ingress request, instead of the fixed `ingress_user`. A calibre-web account with the same name must exist; otherwise the normal calibre-web login page is shown. Off by default, so existing installs keep logging in as `ingress_user` exactly as before (https://github.com/alexbelgium/hassio-addons/issues/3072) ## 0.6.27.4 (2026-09-04) - Fix: Kobo sync could not be enabled, failing with "Kepubify binary not found" even when the path was set by hand. The LinuxServer base image installs the converter as `/usr/bin/kepubify` with `curl -o`, which leaves it mode 0644 and gives it a name calibre-web does not accept : `binary_helper.py` only takes `kepubify-linux-64bit` or `kepubify-linux-32bit`, and only when `os.access(X_OK)` passes. The addon now makes the binary executable and publishes it as `/opt/kepubify/kepubify-linux-64bit`, the directory calibre-web's own autodetection already probes, so the path is filled in without any manual step (https://github.com/alexbelgium/hassio-addons/issues/3040) diff --git a/calibre_web/README.md b/calibre_web/README.md index 9de33bf06b..b9aedba517 100644 --- a/calibre_web/README.md +++ b/calibre_web/README.md @@ -69,6 +69,7 @@ Default password: admin123 | `DOCKER_MODS` | str | | Docker modifications to apply | | `OAUTHLIB_RELAX_TOKEN_SCOPE` | str | | OAuth token scope relaxation | | `ingress_user` | str | | Username for ingress authentication | +| `login_with_ha_user` | bool | `false` | Log in through Ingress as your Home Assistant username instead of `ingress_user` | | `localdisks` | str | | Local drives to mount (e.g., `sda1,sdb1,MYNAS`) | | `networkdisks` | str | | SMB shares to mount (e.g., `//SERVER/SHARE`) | | `cifsusername` | str | | SMB username for network shares | diff --git a/calibre_web/config.yaml b/calibre_web/config.yaml index c556407188..9a35cf5aac 100644 --- a/calibre_web/config.yaml +++ b/calibre_web/config.yaml @@ -112,9 +112,10 @@ schema: cifsusername: str? ingress_user: str? localdisks: str? + login_with_ha_user: bool? networkdisks: str? slug: calibre-web udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/calibre_web -version: "0.6.27.4" +version: "0.6.27.5" video: true diff --git a/calibre_web/rootfs/etc/cont-init.d/32-nginx.sh b/calibre_web/rootfs/etc/cont-init.d/32-nginx.sh index 69a4bd22b1..5a2c939999 100755 --- a/calibre_web/rootfs/etc/cont-init.d/32-nginx.sh +++ b/calibre_web/rootfs/etc/cont-init.d/32-nginx.sh @@ -45,6 +45,15 @@ if bashio::config.has_value 'ingress_user'; then ingress_user=$(bashio::config 'ingress_user') fi +# Log in as the Home Assistant user instead : the Supervisor sends its username with every +# ingress request (X-Remote-User-Name). No username, or no calibre-web account with that name, +# leaves the header empty or unmatched and calibre-web shows its normal login page. +if bashio::config.true 'login_with_ha_user'; then + # shellcheck disable=SC2016 + ingress_user='$http_x_remote_user_name' + bashio::log.info "Ingress logs in as the Home Assistant username" +fi + ingress_port=$(bashio::addon.ingress_port) ingress_interface=$(bashio::addon.ip_address) #ha_port=$(bashio::core.port)