Add P3P headers to avoid potential issues with IE

This commit is contained in:
Frederic Guillot 2016-11-09 19:11:51 -05:00
parent d261f4146d
commit 544da3150a
No known key found for this signature in database
GPG Key ID: 92D77191BA7FBC99
2 changed files with 13 additions and 0 deletions

View File

@ -128,6 +128,18 @@ class Response extends Base
return $this;
}
/**
* Add P3P headers for Internet Explorer
*
* @access public
* @return $this
*/
public function withP3P()
{
$this->withHeader('P3P', 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
return $this;
}
/**
* Set HTTP response body
*

View File

@ -32,6 +32,7 @@ class BootstrapMiddleware extends BaseMiddleware
{
$this->response->withContentSecurityPolicy($this->container['cspRules']);
$this->response->withSecurityHeaders();
$this->response->withP3P();
if (ENABLE_XFRAME) {
$this->response->withXframe();