ldc-bogt/app/Providers/AppServiceProvider.php

37 lines
753 B
PHP
Raw Normal View History

2019-12-04 17:30:46 +01:00
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
2019-12-06 09:52:21 +01:00
use Illuminate\Http\Request;
2019-12-04 17:30:46 +01:00
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
2019-12-06 09:52:21 +01:00
public function boot(Request $request)
2019-12-04 17:30:46 +01:00
{
2019-12-06 09:52:21 +01:00
$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');
}
2019-12-04 17:30:46 +01:00
}
}