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:
committed by
Adam Wathan
parent
dbcbf1edc7
commit
745005dcae
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user