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

Merge pull request #1471 from Werbschaft/patch-1

Update KirbyValetDriver.php
This commit is contained in:
Matt Stauffer
2024-05-31 18:45:03 -04:00
committed by GitHub

View File

@@ -48,6 +48,17 @@ public function frontControllerPath(string $sitePath, string $siteName, string $
$indexPath = $sitePath.'/panel/index.php';
}
// add this block
if (preg_match('/^\/(?!(kirby|site|content)\/).+\.php$/', $uri)) {
if (
$this->isActualFile($sitePath.$uri) ||
$isAboveWebroot && $this->isActualFile($sitePath."/public".$uri)
) {
$scriptName = $uri;
$indexPath = $sitePath.$scriptName;
}
}
$sitePathPrefix = ($isAboveWebroot) ? $sitePath.'/public' : $sitePath;
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];