diff --git a/deploy-production/nginx.conf b/deploy-production/nginx.conf index 3ef22bf..ccaf93f 100644 --- a/deploy-production/nginx.conf +++ b/deploy-production/nginx.conf @@ -82,6 +82,17 @@ server { proxy_send_timeout 300s; } + # GrampsWeb: fix double fonts/ path from CSS relative URL resolution + # fonts.css at /ahnenforschung/fonts/ references url('fonts/file.woff2') + # which resolves to /ahnenforschung/fonts/fonts/file.woff2 + location /ahnenforschung/fonts/fonts/ { + proxy_pass http://127.0.0.1:8090/fonts/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + # GrampsWeb Ahnenforschung # All path rewriting happens here via sub_filter — no container-side patching needed. # GrampsWeb SPA uses Vaadin Router with absolute paths; the injected History API @@ -126,11 +137,7 @@ server { # JS: service worker route handling sub_filter 'createHandlerBoundToURL("/index.html")' 'createHandlerBoundToURL("/ahnenforschung/index.html")'; - # 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('"; + # CSS font paths: handled by separate location block for /ahnenforschung/fonts/fonts/ # WebSocket support proxy_http_version 1.1;