Issue #548💬 AnsweredOpened November 20, 2017by kickbk0 reactions

Agnostic protocol on CDN

快速解答by artf

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

Read full answer below ↓

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, 2017

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

kickbkNovember 21, 2017

@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, 2017

@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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.