]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6237 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Sep 2023 15:39:06 +0000 (17:39 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Sep 2023 15:39:06 +0000 (17:39 +0200)
.env.prod
app/Fluidbook/Farm.php
config/debugbar.php

index d8852f7a50fa2cbd1ce7112e593daec31034d38c..c205366f95a05136ba88c2fe047748174b2c3444 100644 (file)
--- a/.env.prod
+++ b/.env.prod
@@ -2,7 +2,7 @@ APP_NAME="Fluidbook Toolbox"
 APP_ENV=production
 APP_KEY=base64:DRIdIwSEuQNkxuUTfyyRyssizosh3D9QHWTnobrW44U=
 APP_DEBUG=true
-DEBUGBAR_ENABLED=false
+DEBUGBAR_ENABLED=true
 
 APP_URL=https://toolbox.fluidbook.com
 HEADER_COLOR="#263340"
index 40db9f62678525ed29121416011ab46d65256e41..b8a39d12eb9bef8cb7337894d67823515bb290d6 100644 (file)
@@ -145,7 +145,7 @@ class Farm
         }
 
         $res = Cache::rememberForever($cachekey, function () use ($params, $out) {
-            $path = $out . ProcessFile::getFilename($params['page'], $params['format'], $params['resolution'], $params['quality'], $params['withGraphics'], $params['withTexts'], $params['version']);
+            $path = $out . ProcessFile::getFilename($params['page'], $params['format'], $params['resolution'], $params['quality'], $params['withGraphics'], $params['withText'], $params['version']);
             if (file_exists($path)) {
                 return $path;
             }
index 6d9983192479144937b28667b1b8f83d1cc93218..1286c6d0cff4b44fc5ec71cf5dd7ae4ba6bbb660 100644 (file)
@@ -14,7 +14,7 @@ return [
      |
      */
 
-    'enabled' => env('DEBUGBAR_ENABLED', null),
+    'enabled' => !isset($_SERVER['HTTP_X_REAL_IP']) || in_array($_SERVER['HTTP_X_REAL_IP'], ['130.180.213.67', '82.64.156.165']) ? env('DEBUGBAR_ENABLED', null) : false,
     'except' => [
         'telescope*',
         'horizon*',
@@ -33,11 +33,11 @@ return [
      |
      */
     'storage' => [
-        'enabled'    => true,
-        'driver'     => 'file', // redis, file, pdo, custom
-        'path'       => storage_path('debugbar'), // For file driver
+        'enabled' => true,
+        'driver' => 'file', // redis, file, pdo, custom
+        'path' => storage_path('debugbar'), // For file driver
         'connection' => null,   // Leave null for default connection (Redis/PDO)
-        'provider'   => '', // Instance of StorageInterface for custom driver
+        'provider' => '', // Instance of StorageInterface for custom driver
     ],
 
     /*
@@ -102,29 +102,29 @@ return [
      */
 
     'collectors' => [
-        'phpinfo'         => true,  // Php version
-        'messages'        => true,  // Messages
-        'time'            => true,  // Time Datalogger
-        'memory'          => true,  // Memory usage
-        'exceptions'      => true,  // Exception displayer
-        'log'             => true,  // Logs from Monolog (merged in messages if enabled)
-        'db'              => true,  // Show database (PDO) queries and bindings
-        'views'           => false,  // Views with their data
-        'route'           => true,  // Current route information
-        'auth'            => true, // Display Laravel authentication status
-        'gate'            => true,  // Display Laravel Gate checks
-        'session'         => true,  // Display session data
+        'phpinfo' => true,  // Php version
+        'messages' => true,  // Messages
+        'time' => true,  // Time Datalogger
+        'memory' => true,  // Memory usage
+        'exceptions' => true,  // Exception displayer
+        'log' => true,  // Logs from Monolog (merged in messages if enabled)
+        'db' => true,  // Show database (PDO) queries and bindings
+        'views' => false,  // Views with their data
+        'route' => true,  // Current route information
+        'auth' => true, // Display Laravel authentication status
+        'gate' => true,  // Display Laravel Gate checks
+        'session' => true,  // Display session data
         'symfony_request' => true,  // Only one can be enabled..
-        'mail'            => true,  // Catch mail messages
-        'laravel'         => true, // Laravel version and environment
-        'events'          => false, // All events fired
+        'mail' => true,  // Catch mail messages
+        'laravel' => true, // Laravel version and environment
+        'events' => false, // All events fired
         'default_request' => false, // Regular or special Symfony request logger
-        'logs'            => true, // Add the latest log messages
-        'files'           => false, // Show the included files
-        'config'          => false, // Display config settings
-        'cache'           => false, // Display cache events
-        'models'          => true,  // Display models
-        'livewire'        => true,  // Display Livewire (when available)
+        'logs' => true, // Add the latest log messages
+        'files' => false, // Show the included files
+        'config' => false, // Display config settings
+        'cache' => false, // Display cache events
+        'models' => true,  // Display models
+        'livewire' => true,  // Display Livewire (when available)
     ],
 
     /*
@@ -141,16 +141,16 @@ return [
             'show_name' => true,   // Also show the users name/email in the debugbar
         ],
         'db' => [
-            'with_params'       => true,   // Render SQL with the parameters substituted
-            'backtrace'         => true,   // Use a backtrace to find the origin of the query in your files.
+            'with_params' => true,   // Render SQL with the parameters substituted
+            'backtrace' => true,   // Use a backtrace to find the origin of the query in your files.
             'backtrace_exclude_paths' => [],   // Paths to exclude from backtrace. (in addition to defaults)
-            'timeline'          => true,  // Add the queries to the timeline
+            'timeline' => true,  // Add the queries to the timeline
             'explain' => [                 // Show EXPLAIN output on queries
                 'enabled' => false,
                 'types' => ['SELECT'],     // Deprecated setting, is always only SELECT
             ],
-            'hints'             => false,    // Show hints for common mistakes
-            'show_copy'         => false,    // Show copy button next to the query
+            'hints' => false,    // Show hints for common mistakes
+            'show_copy' => false,    // Show copy button next to the query
         ],
         'mail' => [
             'full_log' => false,