1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 08:40:09 +01:00

Drop exits, fix 404 path

This commit is contained in:
Matt Stauffer
2022-12-22 13:26:47 -05:00
parent 4c67413e7a
commit ccd35e5231
2 changed files with 1 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ public static function domainFromSiteName(string $siteName): string
public static function show404()
{
http_response_code(404);
require __DIR__.'/cli/templates/404.html';
require __DIR__.'/../../cli/templates/404.html';
exit;
}

View File

@@ -68,12 +68,9 @@
$isPhpFile = pathinfo($uri, PATHINFO_EXTENSION) === 'php';
if ($uri !== '/' && ! $isPhpFile && $staticFilePath = $valetDriver->isStaticFile($valetSitePath, $siteName, $uri)) {
exit('is static');
return $valetDriver->serveStaticFile($staticFilePath, $valetSitePath, $siteName, $uri);
}
exit('is not static');
/**
* Allow for drivers to take pre-loading actions (e.g. setting server variables).
*/