jonathanKingston / ember-cli-sri

Generation of SRI hashes for ember
MIT License
48 stars 15 forks source link

Integrity hash failing with chrome data saver enabled #26

Closed thagul closed 7 years ago

thagul commented 7 years ago

If I enable Chrome Data Saver on android devices or on desktop (using addon https://chrome.google.com/webstore/detail/data-saver/pfmgfdlgomnbgkofeojodiodmgpgmkac) I always get error

Failed to find a valid digest in the 'integrity' attribute for resource xxxx with computed SHA-256 integrity 'SNNv36qc62jtyjezdcQqCKm3i+2javQMi3Gi4RVrw2E='. The resource has been blocked.

I didn't added anything to ember-cli-build.js file regarding SRI configuration but if I disable SRI everything works fine.

SRI: {
      enabled: false
    }

I'm using ember-cli: 2.6.2 ember-cli-sri: ^2.1.0 ember.js: ~2.6.0

vividh-furlenco commented 7 years ago

Yes, happening for me too.

Ember      : 2.5.1
Ember Data : 2.7.0

Disabling SRI worked for me too. I am not using a CDN for the assets currently.

jonathanKingston commented 7 years ago

This is a bug with Google and not this. They are not ruling out SRI assets which is a real shame here.

jonathanKingston commented 7 years ago

Closing as won't fix. Will try and contact the addon makers.

jonathanKingston commented 7 years ago

Adding HTTPs on your production servers should mitigate this as they suggest they will only enable this on HTTP assets.

thagul commented 7 years ago

Thanks @jonathanKingston, I will enable https soon or later on production, in the meanwhile I've completely disabled sri