typo3_encore icon indicating copy to clipboard operation
typo3_encore copied to clipboard

Watcher & TYPO3 with CSP don't work well together

Open georgringer opened this issue 1 year ago • 0 comments

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

georgringer avatar Oct 17 '23 11:10 georgringer