Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EventFellows's avatar

Bootstrap Glyphicon Font not loaded via CDN

I am trying to use the bootsrap slider element on one of my Spark pages but have an issue with the fonts used on it not being allowed to load via a CDN. I believe it is not specific to Spark but comes with bootstrap glyphicons and a CDN. I guess, at the end of the day the right question to ask is this: How can I prevent the fonts being concatenated into the app.css file?

Font from origin 'aws-CDN-url.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'my-website.com' is therefore not allowed access.

Here is how far I understand the issue so far:

  • there is a font type used for the "last" and "next" arrow on the slider by the name of Glyphicons
  • the app.less file that get's shiped with Spark includes bootstrap like this @import "node_modules/bootstrap/less/bootstrap";
  • which again includes all the needed bootstrap components including the @import "glyphicons.less";
  • on a gulp-run that gets concatenated into the global app.css

Everything works fine as long as not CDN is involved, but with a CDN the above error is shown and the "last" and "next" arrows are not shown because the font does not get loaded.

I believe that for some reason this font is not allowed to be shared via an own CDN but only from own Server - weird.

Any ideas how I can get this to work?

0 likes
0 replies

Please or to participate in this conversation.