kartik-v / yii2-icons

Set of icon frameworks for easy use in Yii Framework 2.0
http://demos.krajee.com/icons
Other
71 stars 29 forks source link

Pull Request #43 uses a CDN that is blocked #45

Closed adamwinn closed 3 years ago

adamwinn commented 3 years ago

My work's VPN blocks access to https://cdn.bootcss.com so now our website is broken because of this change.

Please revert this fix to use the normal Font Awesome CDN or provide a way to override this URL so we can provide our own CDN URL

image001

kartik-v commented 3 years ago

Thanks for the update. I think this needs to be set to a default CDN which works across (do let know which one to use). This default CDN can be overridden from Yii2 Asset Manager configuration by each developer.

adamwinn commented 3 years ago

I rolled back to version 1.4.5, which uses https://use.fontawesome.com/releases/v5.3.1/js/all.js.

The official CDN that font awesome uses is https://use.fontawesome.com, viewable at https://cdn.fontawesome.com/

I tried to override the CDN value with Yii2 Asset Manager but I couldn't find any good documentation

kartik-v commented 3 years ago

You can refer to overriding asset bundles via asset manager in yii2 docs -check this example

steve962 commented 3 years ago

I think the old CDN from 1.4.5 is probably a more reliable choice for most users - I had to do quite a bit of digging to figure out why a lot of our applications were suddenly taking forever to load or failing completely, and why they were suddenly referencing a slow Chinese site. (10-20 seconds average load time, if it works at all, which is only half the time... This might also be a firewall / VPN issue here, or just massive latency...) I resolved it on our apps in development by explicitly including yii2-icons 1.4.5 in composer.json - and froze updates on production apps until this issue is resolved.

I'm not entirely sure why China was having a problem with the normal fontawesome URL, but if your recommended solution for this is overriding asset bundles, I recommend having them do that and restoring this package so it uses the official fontawesome CDN and doesn't break existing apps everywhere else.

kartik-v commented 3 years ago

I think it makes sense... will set the default to the FontAwesome CDN.

kartik-v commented 3 years ago

Updated to use Font Awesome Default CDN ... can be overridden from Yii2 Asset Manager for any other scenario.

adamwinn commented 3 years ago

@kartik-v Can you make a release now? This is an important fix