mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
improve static driver
This commit is contained in:
@@ -25,7 +25,15 @@ public function serves($sitePath, $siteName, $uri)
|
||||
*/
|
||||
public function isStaticFile($sitePath, $siteName, $uri)
|
||||
{
|
||||
return $sitePath.$uri;
|
||||
if (file_exists($staticFilePath = $sitePath.$uri) && ! is_dir($staticFilePath)) {
|
||||
return $staticFilePath;
|
||||
} elseif (file_exists($staticFilePath = $sitePath.$uri.'/index.html')) {
|
||||
return $staticFilePath;
|
||||
} elseif (file_exists($staticFilePath = $sitePath.$uri)) {
|
||||
return $staticFilePath;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user