SRI for broccoli
This plugin looks at an apps html files to rewrite their content with integrity attributes.
Options
- origin - if
crossorigin
isn't specified but prepend
is it will add an integrity if prepend
starts with origin
- crossorigin - adds a crossorigin attribute to script and link elements
- This is required for CORS resources values are:
- prepend - resources with a full path will only get an applied integrity if the md5 checksum passes
Example
var sriTree = sri('path/to/code, {
prefix: 'https://example.com/',
crossorigin: 'anonymous'
});