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

Bring in changes to mirror #1356

This commit is contained in:
Matt Stauffer
2023-02-07 21:13:39 -05:00
parent 2186e7cfee
commit 232dfd9361
3 changed files with 1 additions and 21 deletions

View File

@@ -18,7 +18,7 @@ public function serves(string $sitePath, string $siteName, string $uri): bool
public function beforeLoading(string $sitePath, string $siteName, string $uri): void
{
$_SERVER['PHP_SELF'] = $uri;
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
$_SERVER['SERVER_ADDR'] = $_SERVER['SERVER_ADDR'] ??'127.0.0.1';
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
}

View File

@@ -17,16 +17,6 @@ public function serves(string $sitePath, string $siteName, string $uri): bool
file_exists($sitePath.'/config/application.php'));
}
/**
* Take any steps necessary before loading the front controller for this driver.
*/
public function beforeLoading(string $sitePath, string $siteName, string $uri): void
{
$_SERVER['PHP_SELF'] = $uri;
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
}
/**
* Determine if the incoming request is for a static file.
*/

View File

@@ -14,16 +14,6 @@ public function serves(string $sitePath, string $siteName, string $uri): bool
return file_exists($sitePath.'/wp-config.php') || file_exists($sitePath.'/wp-config-sample.php');
}
/**
* Take any steps necessary before loading the front controller for this driver.
*/
public function beforeLoading(string $sitePath, string $siteName, string $uri): void
{
$_SERVER['PHP_SELF'] = $uri;
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
}
/**
* Get the fully resolved path to the application's front controller.
*/