mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
Improved HTTP_HOST rewriting
This commit is contained in:
committed by
Adam Wathan
parent
4f383f2d77
commit
dbcbf1edc7
@@ -45,6 +45,10 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
||||
*/
|
||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||
{
|
||||
if (isset($_SERVER['HTTP_X_ORIGINAL_HOST']) && isset($_SERVER['HTTP_X_INBOUND_HOST']) && $_SERVER['HTTP_X_ORIGINAL_HOST'] === $_SERVER['HTTP_HOST']) {
|
||||
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_INBOUND_HOST'];
|
||||
}
|
||||
|
||||
if (file_exists($frontControllerPath = $sitePath.'/web/app_dev.php')) {
|
||||
return $frontControllerPath;
|
||||
} elseif (file_exists($frontControllerPath = $sitePath.'/web/app.php')) {
|
||||
|
||||
Reference in New Issue
Block a user