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

rewrite host on the fly for ngrok

This commit is contained in:
Taylor Otwell
2016-05-05 13:53:38 -05:00
parent f7c1165f6c
commit 067e02a43c

View File

@@ -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';
}
}