Update AssetController.php

This commit is contained in:
Linas Pašviestis
2023-05-05 17:58:09 +03:00
committed by GitHub
parent 4a2abe1164
commit 2cd9488f13
@@ -74,11 +74,17 @@ class AssetController
]);
}
return response()->file($path, [
'Content-Type' => $contentType,
'Expires' => $this->getHttpDate($expires),
'Cache-Control' => $cacheControl,
'Last-Modified' => $this->getHttpDate($lastModified),
]);
response()
->file($path, [
'Accept-Ranges' => 'bytes',
'Content-Length' => filesize($path),
'Content-Type' => $contentType,
'Expires' => $this->getHttpDate($expires),
'Cache-Control' => $cacheControl,
'Last-Modified' => $this->getHttpDate($lastModified),
])
->send();
exit();
}
}