Created
May 18, 2021 09:46
-
-
Save thatal/c2bed0d98cbc8feafcab5c5f7479a6b5 to your computer and use it in GitHub Desktop.
Expose redirected to local site error fixing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
if(\App::environment()=='local' && isset($_SERVER['HTTP_X_ORIGINAL_HOST'])){ | |
$this->app['url']->forceRootUrl($_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_X_ORIGINAL_HOST']); | |
} | |
} | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment