mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Make 127.0.0.1 SERVER_ADDR definition only if null (#1356)
This commit is contained in:
@@ -51,7 +51,7 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
|||||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||||
{
|
{
|
||||||
$_SERVER['PHP_SELF'] = $uri;
|
$_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'];
|
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
$dynamicCandidates = [
|
$dynamicCandidates = [
|
||||||
|
|||||||
@@ -49,10 +49,6 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
|||||||
*/
|
*/
|
||||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||||
{
|
{
|
||||||
$_SERVER['PHP_SELF'] = $uri;
|
|
||||||
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
|
|
||||||
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
|
|
||||||
|
|
||||||
return parent::frontControllerPath(
|
return parent::frontControllerPath(
|
||||||
$sitePath.'/web',
|
$sitePath.'/web',
|
||||||
$siteName,
|
$siteName,
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ public function serves($sitePath, $siteName, $uri)
|
|||||||
*/
|
*/
|
||||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||||
{
|
{
|
||||||
$_SERVER['PHP_SELF'] = $uri;
|
|
||||||
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
|
|
||||||
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
|
|
||||||
|
|
||||||
return parent::frontControllerPath(
|
return parent::frontControllerPath(
|
||||||
$sitePath, $siteName, $this->forceTrailingSlash($uri)
|
$sitePath,
|
||||||
|
$siteName,
|
||||||
|
$this->forceTrailingSlash($uri)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user