Skip to content

Commit 02a62b0

Browse files
TASK: Enhance README.md (#231)
Resolves: #207
1 parent 4d9d03c commit 02a62b0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,17 @@ Encore
286286
module.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

291302
The `typo3/cms-composer-installers` library takes care of moving TYPO3-specific assets in the right place

0 commit comments

Comments
 (0)