Ember CLI addon for generating Subresource Integrity (SRI) hashes to secure JavaScript and CSS subresources against CDN poisoning and corruption. Current stable version is 2.1.1. Released as needed, with v2.0.0 introducing a default disabling of paranoiaCheck. Key differentiator: it integrates seamlessly with Ember CLI and fingerprinting, providing fail-safe defaults that avoid breaking the app when misconfigured. Supports CORS and relative/absolute URLs.
npm install ember-cli-sriVerified import paths — ran on the pinned version, not inferred.
Configures SRI with CORS for assets served from a CDN. Ensure origin matches prepend or crossorigin is set.
Set SRI.paranoiaCheck: true to restore v1 behavior.
Ensure fingerprint.prepend matches the actual asset prefix.
Set SRI.crossorigin to 'anonymous' or 'use-credentials' and ensure CORS headers are present.
Use SRI.crossorigin and fingerprint.prepend instead.
Ensure fingerprint.prepend matches the asset URL's prefix and set SRI.crossorigin if the asset is on a different origin.
Set SRI.crossorigin to 'anonymous' or 'use-credentials' in the EmberApp config.