Feature: #66698 - Add integrity property to JavaScript files

See Issue #66698

Description

Add a property integrity="some-hash" to JavaScript files via TypoScript

page.includeJSLibs.<array>.integrity = some-hash

This patch affects the TypoScript PAGE properties

  • includeJSLibs
  • includeJSFooterLibs
  • includeJS
  • includeJSFooter

Usage:

page {
        includeJS {
                jQuery = fileadmin/jquery-1.10.2.min.js
                jQuery.disableCompression = 1
                jQuery.excludeFromConcatenation = 1
                jQuery.integrity = sha256-C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg=
        }
}

Hint

Integrity hashes may be generated using https://www.srihash.org/.