headers->set('X-content-type-options', 'nosniff'); $response->headers->set('X-xss-protection', '1; mode=block'); // http://tools.ietf.org/html/rfc6797 /** * The HSTS header field below stipulates that the HSTS Policy is to * remain in effect for one year (there are approximately 31536000 * seconds in a year) * applies to the domain of the issuing HSTS Host and all of its * subdomains: */ //$response->headers->set('Strict-Transport-Security', 'max-age=31536000; includeSubDomains'); return $response; } }