Loading src/Controller/FileDownloadController.php +2 −2 Original line number Diff line number Diff line Loading @@ -180,10 +180,10 @@ class FileDownloadController extends ControllerBase { * The transferred file as response. */ protected function webpResponse($file, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => 'image/webp', 'Content-Length' => filesize($file), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading src/Controller/ImageStyleDownloadController.php +4 −4 Original line number Diff line number Diff line Loading @@ -234,10 +234,10 @@ class ImageStyleDownloadController extends FileDownloadController { * The transferred file as response. */ protected function webpResponse($file, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => 'image/webp', 'Content-Length' => filesize($file), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading @@ -259,10 +259,10 @@ class ImageStyleDownloadController extends FileDownloadController { * The transferred file as response. */ protected function response(Image $image, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => $image->getMimeType(), 'Content-Length' => $image->getFileSize(), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading Loading
src/Controller/FileDownloadController.php +2 −2 Original line number Diff line number Diff line Loading @@ -180,10 +180,10 @@ class FileDownloadController extends ControllerBase { * The transferred file as response. */ protected function webpResponse($file, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => 'image/webp', 'Content-Length' => filesize($file), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading
src/Controller/ImageStyleDownloadController.php +4 −4 Original line number Diff line number Diff line Loading @@ -234,10 +234,10 @@ class ImageStyleDownloadController extends FileDownloadController { * The transferred file as response. */ protected function webpResponse($file, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => 'image/webp', 'Content-Length' => filesize($file), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading @@ -259,10 +259,10 @@ class ImageStyleDownloadController extends FileDownloadController { * The transferred file as response. */ protected function response(Image $image, array $headers, $scheme) { $headers += [ $headers = array_merge($headers, [ 'Content-Type' => $image->getMimeType(), 'Content-Length' => $image->getFileSize(), ]; ]); // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not // already modified. We pass in FALSE for non-private schemes for the Loading