jonathanKingston / ember-cli-sri

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

ember-cli-deploy-gzip & ember-cli-sri #32

Closed campbecf closed 6 years ago

campbecf commented 6 years ago

ember-cli-sri seems to be providing hashes for pre-gzip values which don't seem to work.

Failed to find a valid digest in the 'integrity' attribute for resource

etc..

If I cat file.js | openssl dgst -sha256 -binary | openssl enc -base64 -A I get the hash I'd expect for the gzipped version.

If I gunzip -c file.js | openssl dgst -sha256 -binary | openssl enc -base64 -A I get the hash that ember-cli-sri expects to work.

campbecf commented 6 years ago

Leaving this here for people searching on this error, but my problem appeared to be Cloudfront gzipping files. Once I turned that off and started gzipping everything myself this seems to work.