Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
James Cole 2016-08-29 19:21:40 +02:00
parent ca2301959c
commit 2e88024bca
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,7 @@
APP_ENV=production
APP_DEBUG=false
APP_FORCE_SSL=false
APP_FORCE_ROOT=
APP_KEY=SomeRandomStringOf32CharsExactly
LOG_LEVEL=warning

View File

@ -13,6 +13,7 @@ namespace FireflyIII\Providers;
use Illuminate\Support\ServiceProvider;
use Log;
use URL;
/**
* Class AppServiceProvider
@ -28,9 +29,16 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
// force root URL.
$forcedUrl = env('APP_FORCE_ROOT', '');
if (strlen($forcedUrl) > 0) {
URL::forceRootUrl($forcedUrl);
}
// force https urls
if (env('APP_FORCE_SSL', false)) {
\URL::forceSchema('https');
URL::forceSchema('https');
}
}