ENHANCEMENT: implemented CSP
This commit is contained in:
parent
c9b109601a
commit
ce70f7fdbc
@ -39,6 +39,9 @@ class Router
|
||||
$response = $controllerObj->$action(...$method);
|
||||
|
||||
if ($response instanceof Response) {
|
||||
$response->headers->add([
|
||||
"Content-Security-Policy" => "default-src 'none'; font-src 'self'; style-src 'self'; script-src 'self'; img-src 'self'; require-trusted-types-for 'script'"
|
||||
]);
|
||||
return $response;
|
||||
} else {
|
||||
throw new InvalidArgumentException();
|
||||
|
Loading…
Reference in New Issue
Block a user