Ionicons: webfont not working now 'Access-Control-Allow-Origin'

Created on 1 Nov 2019  路  7Comments  路  Source: ionic-team/ionicons

console log:
Access to font at 'https://unpkg.com/[email protected]/dist/fonts/ionicons.woff2?v=4.5.9-1' from origin 'http://devi4nik.club' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://filmbaz.co' that is not equal to the supplied origin.
jquery.min.js?v=1.10.2:4 GET https://unpkg.com/[email protected]/dist/fonts/ionicons.woff2?v=4.5.9-1 net::ERR_FAILED
(anonymous) @ jquery.min.js?v=1.10.2:4
c @ jquery.min.js?v=1.10.2:4
fireWith @ jquery.min.js?v=1.10.2:4
ready @ jquery.min.js?v=1.10.2:4
q @ jquery.min.js?v=1.10.2:4
(index):1 Access to font at 'https://unpkg.com/[email protected]/dist/fonts/ionicons.woff?v=4.5.9-1' from origin 'http://devi4nik.club' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://filmbaz.co' that is not equal to the supplied origin.
(index):1 GET https://unpkg.com/[email protected]/dist/fonts/ionicons.woff?v=4.5.9-1 net::ERR_FAILED
(index):1 Access to font at 'https://unpkg.com/[email protected]/dist/fonts/ionicons.ttf?v=4.5.9-1' from origin 'http://devi4nik.club' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://hen-party.loc' that is not equal to the supplied origin.
(index):1 GET https://unpkg.com/[email protected]/dist/fonts/ionicons.ttf?v=4.5.9-1 net::ERR_FAILED

Most helpful comment

Replacing

https://unpkg.com/[email protected]/dist/css/ionicons.min.css

with

https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.5/css/ionicons.min.css

works for me.

All 7 comments

i've same issue blocked by CORS. to solved this i'm trying to downgrade the version, and using another host ionicons from CDN : https://cdnjs.com/libraries/ionicons/4.5.5.
just for a while !!

Replacing

https://unpkg.com/[email protected]/dist/css/ionicons.min.css

with

https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.5/css/ionicons.min.css

works for me.

Same problem here, it looks like the cdn has references to random webshops...

Replacing

https://unpkg.com/[email protected]/dist/css/ionicons.min.css

with

https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.5/css/ionicons.min.css

works for me.

Is the cdn official? Because the one provided by ionicons is https://unpkg.com/[email protected]/dist/css/ionicons.min.css

Is the cdn official? Because the one provided by ionicons is https://unpkg.com/[email protected]/dist/css/ionicons.min.css

Might not be official but cdnjs is trustworthy. I changed it to cdnjs and it's working again now, could just be an issue with unpkg as it's using the same ionicons version.

unpkg.com recovered. Looks like they had Halloween

unpkg is buggy - too many down times, I change to https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.6/ionicons.js - seems more stable

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbrantly picture jbrantly  路  4Comments

lesha1201 picture lesha1201  路  8Comments

edu526 picture edu526  路  6Comments

anthowm picture anthowm  路  11Comments

Simon-Laux picture Simon-Laux  路  10Comments