Hi, working on typo3 v12.4.11, CSP error in frontend "Settings of Page blocked loading of external Javascript-Source.
Doesn’t work
-
by default enforceContentSecurityPolicy = false.
-
Checked multiple browsers, error the same
-
htaccess has no CSP Restrictions
-
tested with enforceContentSecurityPolicy = true
-
Script is loaded via Viewhelper using Assetcontroller → addJavascript
-
added useNonce as option
-
added Configurarion/ContentSecurityPolicy.php
Source: Content security policy — TYPO3 Explained 12.4 documentation
Works
- Adding page.config.additionalHeaders.10.header with CSP script-src and removing Configurarion/ContentSecurityPolicy.php
Tested downgrade because of Bug #102438: CSP-Errors after update to 12.4.8 - TYPO3 Core - TYPO3 Forge
Question:
- Why does the CSP error can occurs, if enforceContentSecurityPolicy =false
- Why does Typoscript additional Header works. Not in documentation. Project ingtegrations the “mutations” shall be used
- Any ideas?