Project

General

Profile

Actions

Bug #78262

closed

Missing CORS settings attribute when using integrity with includeJS

Added by Xavier Perseguers about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
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

chrome.png (24.9 KB) chrome.png Xavier Perseguers, 2016-10-12 14:28

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #76459: Add crossorigin property to JavaScript filesClosedJacob Dreesen2016-06-05

Actions
Actions

Also available in: Atom PDF