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

Simplified HTTP_HOST rewriting

This commit is contained in:
Vic D'Elfant
2017-06-09 09:59:35 +02:00
committed by Adam Wathan
parent dbcbf1edc7
commit 745005dcae
3 changed files with 8 additions and 15 deletions

View File

@@ -53,6 +53,11 @@ public function isStaticFile($sitePath, $siteName, $uri)
*/
public function frontControllerPath($sitePath, $siteName, $uri)
{
// Shortcut for getting the "local" hostname as the HTTP_HOST
if (isset($_SERVER['HTTP_X_ORIGINAL_HOST']) && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
return $sitePath.'/public/index.php';
}
}