35 lines
746 B
PHP
35 lines
746 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Http\Request;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot(Request $request)
|
|
{
|
|
$proxy_url = env('PROXY_URL');
|
|
$host = $request->getHost();
|
|
if ($this->app->environment('dev')) {
|
|
\URL::forceScheme('https');
|
|
} elseif ($this->app->environment('production')) {
|
|
\URL::forceRootUrl($proxy_url);
|
|
\URL::forceScheme('https');
|
|
}
|
|
}
|
|
}
|