We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1746ed1 commit 0bfb454Copy full SHA for 0bfb454
1 file changed
scripts/events/lib/vendors.js
@@ -49,7 +49,13 @@ module.exports = hexo => {
49
});
50
vendors[key] = {
51
url : links[plugins] || links.cdnjs,
52
- integrity: value.integrity
+ // Subresource Integrity only adds value for cross-origin CDN assets.
53
+ // The hashes in _vendors.yml are computed for the CDN builds; when
54
+ // self-hosting (`plugins: local`) the files are served same-origin and
55
+ // may differ byte-for-byte from those builds (e.g. a newer bundled
56
+ // version), so a hardcoded hash would make the browser block them.
57
+ // Omit integrity for local assets.
58
+ integrity: plugins === 'local' ? undefined : value.integrity
59
};
60
}
61
0 commit comments