Issue #548Opened November 20, 2017by kickbk0 reactions

Agnostic protocol on CDN

Question

Just a thought, but you may want to consider loading fontawesome agnostically in your CDN files. Currently getting "Access to Font at 'https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.37/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://localhost:3000' has been blocked by CORS policy..." on dev environment. BTW, not sure I said it before, but this project is absolutely great.

Answers (3)

artfNovember 21, 20170 reactions

Thanks @kickbk :) Anyway, I don't get exactly which is your solution

kickbkNovember 21, 20170 reactions

@artf you're referencing FA in https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.37/css/grapes.min.css with ...'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0") so cloudflare is trying to load the fonts from https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.37/fonts/fontawesome-webfont.woff2?v=4.7.0 which doesn't exist, and if it did, it would be throw CORS errors on localhost dev environments and non-ssl websites.

I'm not sure what the solution should be. Personally, I would load FA separately from grapesjs.css. In many cases we load FA with CDN anyway.

artfNovember 22, 20170 reactions

@kickbk well actually I plan to remove FA (#74) from core's dependencies and replace the used icons with SVGs

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.