Do not execute controller if the response is already sent

This commit is contained in:
Frederic Guillot
2016-05-25 21:28:33 -04:00
parent 74a84a28e3
commit 872dc79dbd
3 changed files with 19 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ class BootstrapMiddleware extends BaseMiddleware
$this->response->withContentSecurityPolicy($this->container['cspRules']);
$this->response->withSecurityHeaders();
if (ENABLE_XFRAME && $this->router->getAction() !== 'readonly') {
if (ENABLE_XFRAME) {
$this->response->withXframe();
}