From 905e5a7d6ca7d4bcac1dcd43b071b90ff9f5c2b1 Mon Sep 17 00:00:00 2001 From: SysAdmin Agent Date: Tue, 24 Mar 2026 10:08:35 +0000 Subject: [PATCH] Fix GrampsWeb subpath: patch location.href redirects to root (STI-90) GrampsWeb JS has 6 instances of location.href="/" that redirect users to the root domain (Django app) instead of /ahnenforschung/. These are now patched at container startup alongside the API path rewrites. Co-Authored-By: Claude Opus 4.6 --- compose.yml | 2 ++ deploy-production/docker-compose.prod.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/compose.yml b/compose.yml index 12f43ee..2d0feaa 100644 --- a/compose.yml +++ b/compose.yml @@ -227,6 +227,8 @@ services: sed -i 's|`/fonts/|`'"$${SUBPATH}"'fonts/|g' "$$f" sed -i "s|\"/assets/|\"$${SUBPATH}assets/|g" "$$f" sed -i 's|`/assets/|`'"$${SUBPATH}"'assets/|g' "$$f" + sed -i "s|location\.href=\"/\"|location.href=\"$$SUBPATH\"|g" "$$f" + sed -i "s|document\.location\.href=\"/\"|document.location.href=\"$$SUBPATH\"|g" "$$f" echo "[grampsweb] patched JS paths: $$f" fi done diff --git a/deploy-production/docker-compose.prod.yml b/deploy-production/docker-compose.prod.yml index 8eb9688..6e86154 100644 --- a/deploy-production/docker-compose.prod.yml +++ b/deploy-production/docker-compose.prod.yml @@ -153,6 +153,8 @@ services: sed -i 's|`/fonts/|`'"$${SUBPATH}"'fonts/|g' "$$f" sed -i "s|\"/assets/|\"$${SUBPATH}assets/|g" "$$f" sed -i 's|`/assets/|`'"$${SUBPATH}"'assets/|g' "$$f" + sed -i "s|location\.href=\"/\"|location.href=\"$$SUBPATH\"|g" "$$f" + sed -i "s|document\.location\.href=\"/\"|document.location.href=\"$$SUBPATH\"|g" "$$f" echo "[grampsweb] patched JS paths: $$f" fi done