updates
This commit is contained in:
parent
912aa99054
commit
22437918d9
4 changed files with 44 additions and 10 deletions
|
@ -45,13 +45,13 @@ class CspMiddleware
|
|||
->addDirective('base-uri', [])
|
||||
->addDirective('frame-ancestors', [])
|
||||
->addSource('form-action', '*')
|
||||
->addSource('img-src', '*');
|
||||
->addSource('img-src', '*')
|
||||
->addSource('img-src', 'data:');
|
||||
|
||||
if ($this->config->debug) {
|
||||
// So maximebf/debugbar, symfony/debug and symfony/error-handler can work.
|
||||
$csp->setDirective('script-src', ['self' => true, 'unsafe-inline' => true])
|
||||
->setDirective('style-src', ['self' => true, 'unsafe-inline' => true])
|
||||
->addSource('img-src', 'data:');
|
||||
->setDirective('style-src', ['self' => true, 'unsafe-inline' => true]);
|
||||
}
|
||||
|
||||
return $csp->injectCSPHeader($response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue