mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 00:22:36 +02:00
Fonts require CORS mode per spec, but file:// origins are opaque in our implementation, so the standard same-origin check in main_fetch always fails for file-to-file font loads. This caused @font-face rules referencing local .woff2 files to fail with a NetworkError. Fix this by treating file:// font loads from file:// pages as same-origin, routing them through scheme_fetch with basic response tainting instead of rejecting them for not being HTTP(S). This matches the behavior of Chromium, WebKit, and Firefox, all of which allow local font loading from local pages.