Skip to content

Commit

Permalink
rewrite host on the fly for ngrok
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 5, 2016
1 parent f7c1165 commit 067e02a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/LaravelValetDriver.php
Expand Up @@ -46,6 +46,10 @@ public function isStaticFile($sitePath, $siteName, $uri)
*/
public function frontControllerPath($sitePath, $siteName, $uri)
{
if (isset($_SERVER['HTTP_X_ORIGINAL_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_ORIGINAL_HOST'];
}

return $sitePath.'/public/index.php';
}
}

0 comments on commit 067e02a

Please sign in to comment.