mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
Drop exits, fix 404 path
This commit is contained in:
@@ -43,7 +43,7 @@ public static function domainFromSiteName(string $siteName): string
|
|||||||
public static function show404()
|
public static function show404()
|
||||||
{
|
{
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
require __DIR__.'/cli/templates/404.html';
|
require __DIR__.'/../../cli/templates/404.html';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,12 +68,9 @@
|
|||||||
$isPhpFile = pathinfo($uri, PATHINFO_EXTENSION) === 'php';
|
$isPhpFile = pathinfo($uri, PATHINFO_EXTENSION) === 'php';
|
||||||
|
|
||||||
if ($uri !== '/' && ! $isPhpFile && $staticFilePath = $valetDriver->isStaticFile($valetSitePath, $siteName, $uri)) {
|
if ($uri !== '/' && ! $isPhpFile && $staticFilePath = $valetDriver->isStaticFile($valetSitePath, $siteName, $uri)) {
|
||||||
exit('is static');
|
|
||||||
return $valetDriver->serveStaticFile($staticFilePath, $valetSitePath, $siteName, $uri);
|
return $valetDriver->serveStaticFile($staticFilePath, $valetSitePath, $siteName, $uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit('is not static');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow for drivers to take pre-loading actions (e.g. setting server variables).
|
* Allow for drivers to take pre-loading actions (e.g. setting server variables).
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user