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

Make 127.0.0.1 SERVER_ADDR definition only if null (#1356)

This commit is contained in:
Matt Stauffer
2023-01-29 21:20:18 -05:00
committed by GitHub
parent 609183786b
commit a2d3c04ab5
3 changed files with 4 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ public function isStaticFile($sitePath, $siteName, $uri)
public function frontControllerPath($sitePath, $siteName, $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'];
$dynamicCandidates = [