typo3_encore
typo3_encore copied to clipboard
Watcher & TYPO3 with CSP don't work well together
I was not successful to make TYPO3 v12 with watcher and CSP work, therefore I added following to my additional.php after check of the context
// disable CSP if "npm run watch" is used
if (strpos(file_get_contents(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/build/entrypoints.json'), 'build/vendors-node_modules') !== false) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['features']['security.frontend.enforceContentSecurityPolicy'] = false;
}
this is issue is more a FYI and to add it to docs. it is not a bug in typo3_encore