mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-16 09:51:16 +00:00
Update some code for Heroku.
This commit is contained in:
@@ -36,7 +36,7 @@ DB_CONNECTION=pgsql
|
|||||||
# 'daily' is the default logging mode giving you 5 daily rotated log files in /storage/logs/.
|
# '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).
|
# 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.
|
# 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:
|
# Log level. You can set this from least severe to most severe:
|
||||||
# debug, info, notice, warning, error, critical, alert, emergency
|
# debug, info, notice, warning, error, critical, alert, emergency
|
||||||
|
@@ -25,7 +25,7 @@ namespace FireflyIII\Providers;
|
|||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Laravel\Passport\Passport;
|
use Laravel\Passport\Passport;
|
||||||
|
use URL;
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* Class AppServiceProvider.
|
* Class AppServiceProvider.
|
||||||
@@ -38,6 +38,9 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
if('heroku' === env('APP_ENV')) {
|
||||||
|
URL::forceScheme('https');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
fastcgi_param HTTP_PROXY "";
|
fastcgi_param HTTP_PROXY "";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
if ($http_x_forwarded_proto != "https") {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
# try to serve file directly, fallback to rewrite
|
# try to serve file directly, fallback to rewrite
|
||||||
try_files $uri @rewriteapp;
|
try_files $uri @rewriteapp;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user