Skip to content

Firefly III: a personal finances manager

Update debug information.

James Cole428bdfbe6f25
diff --git a/.env.docker b/.env.docker
index 87a4185f85..3a2c4c0e50 100644
--- a/.env.docker
+++ b/.env.docker
@@ -55,4 +55,6 @@ PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
+
IS_DOCKER=true
+IS_SANDSTORM=false
diff --git a/.env.example b/.env.example
index 9ea22b59c0..c7b5705427 100644
--- a/.env.example
+++ b/.env.example
@@ -55,4 +55,6 @@ PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
+
IS_DOCKER=false
+IS_SANDSTORM=false
diff --git a/.env.sandstorm b/.env.sandstorm
index e1d0500322..dee887b78d 100755
--- a/.env.sandstorm
+++ b/.env.sandstorm
@@ -55,4 +55,6 @@ PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
+
IS_DOCKER=false
+IS_SANDSTORM=true
diff --git a/.env.testing b/.env.testing
index ad9a3f9c90..b365fabf63 100644
--- a/.env.testing
+++ b/.env.testing
@@ -56,3 +56,5 @@ PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
+IS_DOCKER=false
+IS_SANDSTORM=false
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 5b040fd429..9d7ba8ff45 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -94,14 +94,17 @@ class HomeController extends Controller
*/
public function displayDebug(Request $request)
{
- $phpVersion = PHP_VERSION;
- $phpOs = php_uname();
- $interface = php_sapi_name();
- $now = Carbon::create()->format('Y-m-d H:i:s e');
- $extensions = join(', ', get_loaded_extensions());
- $drivers = join(', ', DB::availableDrivers());
- $currentDriver = DB::getDriverName();
- $userAgent = $request->header('user-agent');
+ $phpVersion = PHP_VERSION;
+ $phpOs = php_uname();
+ $interface = php_sapi_name();
+ $now = Carbon::create()->format('Y-m-d H:i:s e');
+ $extensions = join(', ', get_loaded_extensions());
+ $drivers = join(', ', DB::availableDrivers());
+ $currentDriver = DB::getDriverName();
+ $userAgent = $request->header('user-agent');
+ $isSandstorm = var_export(env('IS_SANDSTORM', 'unknown'), true);
+ $isDocker = var_export(env('IS_DOCKER', 'unknown'), true);
+ $trustedProxies = env('TRUSTED_PROXIES', '(none)');
// get latest log file:
$logger = Log::getMonolog();
@@ -118,7 +121,11 @@ class HomeController extends Controller
// last few lines
$logContent = 'Truncated from this point <----|' . substr($logContent, -4096);
- return view('debug', compact('phpVersion', 'extensions', 'carbon', 'now', 'drivers', 'currentDriver', 'userAgent', 'phpOs', 'interface', 'logContent'));
+ return view(
+ 'debug', compact(
+ 'phpVersion', 'extensions', 'carbon', 'now', 'drivers', 'currentDriver', 'userAgent', 'phpOs', 'interface', 'logContent', 'isDocker', 'isSandstorm','trustedProxies'
+ )
+ );
}
diff --git a/resources/views/debug.twig b/resources/views/debug.twig
index 00c269af81..a8e25552d1 100644
--- a/resources/views/debug.twig
+++ b/resources/views/debug.twig
@@ -24,7 +24,11 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
| Current driver | {{ currentDriver }} |
| Using Sandstorm? | {% if SANDSTORM == true %}yes{% else %}no{% endif %} |
{% if SANDSTORM == true %}| Sandstorm anon? | {% if SANDSTORM_ANON == true %}yes{% else %}no{% endif %} |{% endif %}
+| Is Sandstorm (.env) | {{ isSandstorm }} |
+| Is Docker (.env) | {{ isDocker }} |
+| Trusted proxies (.env) | {{ trustedProxies }} |
| User agent | {{ userAgent }} |
+
</textarea>