From ebaaf3dad38e9547f4be94ad188ab37cf7a011b3 Mon Sep 17 00:00:00 2001 From: SysAdmin Agent Date: Sun, 5 Apr 2026 11:25:47 +0000 Subject: [PATCH] Fix nginx: rewrite font paths in CSS to prevent double fonts/ directory (STI-91) GrampsWeb's fonts.css references fonts as url('fonts/MaterialIcons.woff2'). Since fonts.css is served from /ahnenforschung/fonts/fonts.css, the browser resolves this to /ahnenforschung/fonts/fonts/MaterialIcons.woff2 (double fonts/ directory). Strip the fonts/ prefix via sub_filter so the URL resolves correctly to /ahnenforschung/fonts/MaterialIcons.woff2. Co-Authored-By: Paperclip --- deploy-production/nginx.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy-production/nginx.conf b/deploy-production/nginx.conf index 065ed2b..3ef22bf 100644 --- a/deploy-production/nginx.conf +++ b/deploy-production/nginx.conf @@ -126,7 +126,11 @@ server { # JS: service worker route handling sub_filter 'createHandlerBoundToURL("/index.html")' 'createHandlerBoundToURL("/ahnenforschung/index.html")'; - # CSS: font paths — ../fonts/ resolves correctly from subpath, no rewrite needed + # CSS: fix font paths in fonts.css — the CSS lives at /ahnenforschung/fonts/fonts.css + # and references url('fonts/MaterialIcons.woff2') which resolves to + # /ahnenforschung/fonts/fonts/MaterialIcons.woff2 (double fonts/). + # Strip the fonts/ prefix so url('MaterialIcons.woff2') resolves correctly. + sub_filter "url('fonts/" "url('"; # WebSocket support proxy_http_version 1.1;