File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,17 @@ Encore
286286module .exports = Encore .getWebpackConfig ();
287287```
288288
289+ ### Working with Watcher & TYPO3 with Content Security Policy
290+
291+ If you encounter problems with Content Security Policy and watcher add the following to your additional.php
292+
293+ ``` php
294+ // disable CSP if "npm run watch" is used
295+ if (strpos(file_get_contents(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/build/entrypoints.json'), 'build/vendors-node_modules') !== false) {
296+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['features']['security.frontend.enforceContentSecurityPolicy'] = false;
297+ }
298+ ```
299+
289300### Working with typo3/cms-composer-installers 4+ or TYPO3 12
290301
291302The ` typo3/cms-composer-installers ` library takes care of moving TYPO3-specific assets in the right place
You can’t perform that action at this time.
0 commit comments