Beispiel #1
0
 /**
  * Make the response.
  *
  * @param FileInterface $file
  * @return Response
  */
 public function make(FileInterface $file)
 {
     // Start the response.
     $response = $this->response->make();
     $response->headers->set('Etag', $file->etag());
     $response->headers->set('Content-Type', $file->getMimetype());
     $response->headers->set('Last-Modified', $file->lastModified()->setTimezone('GMT')->format('D, d M Y H:i:s'));
     $response->setTtl(3600);
     return $response;
 }