Fix nginx: remove broken font path rewrite that caused double fonts/ in URL (STI-91)
The sub_filter rule '../fonts/' -> 'fonts/' was rewriting relative font paths in CSS served from /ahnenforschung/fonts/fonts.css. This caused the browser to resolve font URLs to /ahnenforschung/fonts/fonts/MaterialIcons.woff2 (double fonts/ directory). The original ../fonts/ paths resolve correctly from the subpath without rewriting. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -126,8 +126,7 @@ server {
|
|||||||
# JS: service worker route handling
|
# JS: service worker route handling
|
||||||
sub_filter 'createHandlerBoundToURL("/index.html")' 'createHandlerBoundToURL("/ahnenforschung/index.html")';
|
sub_filter 'createHandlerBoundToURL("/index.html")' 'createHandlerBoundToURL("/ahnenforschung/index.html")';
|
||||||
|
|
||||||
# CSS: fix relative font paths (served from subpath, ../fonts/ won't resolve)
|
# CSS: font paths — ../fonts/ resolves correctly from subpath, no rewrite needed
|
||||||
sub_filter '../fonts/' 'fonts/';
|
|
||||||
|
|
||||||
# WebSocket support
|
# WebSocket support
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|||||||
Reference in New Issue
Block a user