diff --git a/core/modules/image/src/Controller/ImageStyleDownloadController.php b/core/modules/image/src/Controller/ImageStyleDownloadController.php index 4ad6dc6..e668313 100644 --- a/core/modules/image/src/Controller/ImageStyleDownloadController.php +++ b/core/modules/image/src/Controller/ImageStyleDownloadController.php @@ -183,7 +183,7 @@ public function deliver(Request $request, $scheme, ImageStyleInterface $image_st 'Cache-Control' => 'private', 'Expires' => \DateTime::createFromFormat('j-M-Y H:i:s T', '19-Nov-1978 05:00:00 GMT')->format('D, d M Y H:i:s T'), ); - return new BinaryFileResponse($uri, 200, $headers); + return new BinaryFileResponse($uri, 200, $headers, FALSE); } else { $this->logger->notice('Unable to generate the derived image located at %path.', array('%path' => $derivative_uri)); diff --git a/core/modules/system/src/FileDownloadController.php b/core/modules/system/src/FileDownloadController.php index 8344826..65ad3de 100644 --- a/core/modules/system/src/FileDownloadController.php +++ b/core/modules/system/src/FileDownloadController.php @@ -56,7 +56,7 @@ public function download(Request $request, $scheme = 'private') { throw new AccessDeniedHttpException(); } - return new BinaryFileResponse($uri, 200, $headers); + return new BinaryFileResponse($uri, 200, $headers, $scheme !== 'private'); } throw new NotFoundHttpException();