sabbelasichon / typo3_encore

Use Webpack Encore within TYPO3
Other
106 stars 19 forks source link

Watcher & TYPO3 with CSP don't work well together #207

Open georgringer opened 10 months ago

georgringer commented 10 months ago

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