ENHANCEMENT: implemented CSP
This commit is contained in:
parent
c9b109601a
commit
ce70f7fdbc
@ -39,6 +39,9 @@ class Router
|
|||||||
$response = $controllerObj->$action(...$method);
|
$response = $controllerObj->$action(...$method);
|
||||||
|
|
||||||
if ($response instanceof Response) {
|
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;
|
return $response;
|
||||||
} else {
|
} else {
|
||||||
throw new InvalidArgumentException();
|
throw new InvalidArgumentException();
|
||||||
|
Loading…
Reference in New Issue
Block a user