headers->set('X-Content-Type-Options','nosniff'); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection $response->headers->set('X-XSS-Protection','1; mode=block'); // cache /** * Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; * and that the pragma HTTP header is set with no-cache. */ $response->headers->set('Pragma','no-cache'); $response->headers->set('Expires','0'); $response->headers->set('Cache-Control','no-cache, no-store, must-revalidate, private'); return $response; } }