mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Revert to serving static files through PHP until Caddy bug resolved
This commit is contained in:
@@ -119,7 +119,15 @@ public function mutateUri($uri)
|
||||
*/
|
||||
public function serveStaticFile($staticFilePath, $sitePath, $siteName, $uri)
|
||||
{
|
||||
header('X-Accel-Redirect: ' . $staticFilePath);
|
||||
$extension = strtolower(pathinfo($staticFilePath)['extension']);
|
||||
|
||||
$mimes = require(__DIR__.'/../mimes.php');
|
||||
|
||||
$mime = isset($mimes[$extension]) ? $mimes[$extension] : 'application/octet-stream';
|
||||
|
||||
header('Content-Type: '. $mime);
|
||||
|
||||
readfile($staticFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user