Actions
Bug #78262
closedMissing CORS settings attribute when using integrity with includeJS
Start date:
2016-10-12
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
TypoScript¶
includeJS { jquery = //ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js jquery { external = 1 # integrity was computed with https://srihash.org/ integrity = sha384-Pn+PczAsODRZ2PiGg0IheRROpP7lXO1NTIjiPo6cca8TliBvaeil42fobhzvZd74 } }
Generated HTML¶
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" type="text/javascript" integrity="sha384-Pn+PczAsODRZ2PiGg0IheRROpP7lXO1NTIjiPo6cca8TliBvaeil42fobhzvZd74"></script>
Problem¶
Chrome (at least) does not load the resource and says:
Solution¶
Add attribute crossorigin="anonymous"
when using integrity.
Documentation¶
Files
Actions