Update some code for Heroku.

This commit is contained in:
James Cole 2018-08-01 07:24:19 +02:00
parent 194073e49a
commit e3e8336602
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
3 changed files with 8 additions and 2 deletions

View File

@ -36,7 +36,7 @@ DB_CONNECTION=pgsql
# 'daily' is the default logging mode giving you 5 daily rotated log files in /storage/logs/.
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
# Also available are 'syslog' and 'errorlog' which will log to the system itself.
APP_LOG=errorlog
APP_LOG=syslog
# Log level. You can set this from least severe to most severe:
# debug, info, notice, warning, error, critical, alert, emergency

View File

@ -25,7 +25,7 @@ namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;
use URL;
/**
* @codeCoverageIgnore
* Class AppServiceProvider.
@ -38,6 +38,9 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
Schema::defaultStringLength(191);
if('heroku' === env('APP_ENV')) {
URL::forceScheme('https');
}
}
/**

View File

@ -2,6 +2,9 @@
fastcgi_param HTTP_PROXY "";
location / {
if ($http_x_forwarded_proto != "https") {
return 301 https://$host$request_uri;
}
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}