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)
Thanks @kickbk :) Anyway, I don't get exactly which is your solution
@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.
@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.
Issue #1474
[BUG] FontAwesome request fails with 404
This is for version 0.14.33. After initializing the canvas and selecting an element 3 network requests are generated to the following: http...
Issue #1387
Include all the google fonts?
@artf I want to include all the google fonts in font family. How can we include/import all the font family, Any help would be appreciated.
Issue #444
How to load css link into the head tag?
Hello, First of all, thanks for contributing such an amazing js framework. I am very new to grapesjs. And github too. https://github.com/ar...
Issue #416
image upload with cross Origin issue
I have checked all the issues history,but didin't find a way out. i changed here to allow fetch to cross origin access. my asset manager is...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.