fix(seerr): add trailing slash to ingress root-link rewrites (#2976)

Seerr's Discover link is href="/". nginx rewrote it to the bare ingress
entry, but Home Assistant only routes ingress on
"/api/hassio_ingress/{token}/{path:.*}", so a URL without the trailing
slash matches no route and Home Assistant answers its own plain-text
"404: Not Found" before the request reaches the add-on.

Closes #2975

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Alexandre
2026-08-17 18:35:14 +02:00
committed by GitHub
parent 232e697301
commit 15de5e3a39
3 changed files with 12 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
## 3.4.1.1 (2026-08-16)
- Fixed `404: Not Found` when clicking **Discover** in the sidebar through ingress (#2975). Seerr's Discover link points at `/`, which nginx rewrote to the ingress entry without a trailing slash; Home Assistant only routes ingress on `/api/hassio_ingress/<token>/…`, so the request was rejected by Home Assistant before reaching the add-on. Only ingress was affected; the directly published port 5055 always worked.
## 3.4.1 (2026-08-01)
- Update to latest version from seerr-team/seerr (changelog : https://github.com/seerr-team/seerr/releases)
## 3.3.0.1 (2026-07-28)

View File

@@ -96,4 +96,4 @@ schema:
slug: seerr
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/seerr
version: "3.4.1"
version: "3.4.1.1"

View File

@@ -46,9 +46,14 @@ server {
# Do not rewrite every response type blindly.
sub_filter_types text/html application/javascript text/javascript application/json;
sub_filter 'href="/"' 'href="$app"';
# The trailing slash is required: Home Assistant routes ingress on
# "/api/hassio_ingress/{token}/{path:.*}", so the bare entry without it
# matches no route and Home Assistant answers its own plain-text
# "404: Not Found" before the request ever reaches this add-on. Seerr's
# Discover link is href="/", so without the slash every click on it 404s.
sub_filter 'href="/"' 'href="$app/"';
sub_filter 'href="/login"' 'href="$app/login"';
sub_filter 'href:"/"' 'href:"$app"';
sub_filter 'href:"/"' 'href:"$app/"';
sub_filter '\/_next' '%%ingress_entry_escaped%%\/_next';
sub_filter '/_next' '$app/_next';
sub_filter '/api/v1' '$app/api/v1';