preload-webpack-plugin icon indicating copy to clipboard operation
preload-webpack-plugin copied to clipboard

Ability to disable setting crossorigin for fonts

Open oleg-slapdash opened this issue 4 years ago • 0 comments

We use webpack to build our application for electron. Our html, css and woff2 are delivered over file:// protocol. Setting crossorigin attribute on fonts results in loading the font twice.

example requests:

curl 'file:///<redacted>/Inter-Bold.3J6.woff2' \
  -H 'Origin: file://' \
  -H 'Referer: ' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Slapdash/2.6.5 Chrome/87.0.4280.141 Electron/11.3.0 Safari/537.36' \
  --compressed

curl 'file:///<redacted>/Inter-Bold.3J6.woff2' \
  -H 'Referer: ' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Slapdash/2.6.5 Chrome/87.0.4280.141 Electron/11.3.0 Safari/537.36' \
  --compressed

Please provide a way to disable it.

oleg-slapdash avatar Oct 08 '21 04:10 oleg-slapdash