]> BookStack Code Mirror - bookstack/blob - app/Config/debugbar.php
Merge pull request #5627 from BookStackApp/lexical_20250525
[bookstack] / app / Config / debugbar.php
1 <?php
2
3 /**
4  * Debugbar Configuration Options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 return [
12
13     // Debugbar is enabled by default, when debug is set to true in app.php.
14     // You can override the value by setting enable to true or false instead of null.
15     //
16     // You can provide an array of URI's that must be ignored (eg. 'api/*')
17     'enabled' => env('DEBUGBAR_ENABLED', false),
18     'except'  => [
19         'telescope*',
20     ],
21
22     // DebugBar stores data for session/ajax requests.
23     // You can disable this, so the debugbar stores data in headers/session,
24     // but this can cause problems with large data collectors.
25     // By default, file storage (in the storage folder) is used. Redis and PDO
26     // can also be used. For PDO, run the package migrations first.
27     'storage' => [
28         'enabled'    => true,
29         'driver'     => 'file', // redis, file, pdo, custom
30         'path'       => storage_path('debugbar'), // For file driver
31         'connection' => null,   // Leave null for default connection (Redis/PDO)
32         'provider'   => '', // Instance of StorageInterface for custom driver
33     ],
34
35     // Vendor files are included by default, but can be set to false.
36     // This can also be set to 'js' or 'css', to only include javascript or css vendor files.
37     // Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
38     // and for js: jquery and and highlight.js
39     // So if you want syntax highlighting, set it to true.
40     // jQuery is set to not conflict with existing jQuery scripts.
41     'include_vendors' => true,
42
43     // The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
44     // you can use this option to disable sending the data through the headers.
45     // Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
46
47     'capture_ajax'    => true,
48     'add_ajax_timing' => false,
49
50     // When enabled, the Debugbar shows deprecated warnings for Symfony components
51     // in the Messages tab.
52     'error_handler' => false,
53
54     // The Debugbar can emulate the Clockwork headers, so you can use the Chrome
55     // Extension, without the server-side code. It uses Debugbar collectors instead.
56     'clockwork' => false,
57
58     // Enable/disable DataCollectors
59     'collectors' => [
60         'phpinfo'         => true,  // Php version
61         'messages'        => true,  // Messages
62         'time'            => true,  // Time Datalogger
63         'memory'          => true,  // Memory usage
64         'exceptions'      => true,  // Exception displayer
65         'log'             => true,  // Logs from Monolog (merged in messages if enabled)
66         'db'              => true,  // Show database (PDO) queries and bindings
67         'views'           => true,  // Views with their data
68         'route'           => true,  // Current route information
69         'auth'            => true, // Display Laravel authentication status
70         'gate'            => true, // Display Laravel Gate checks
71         'session'         => true,  // Display session data
72         'symfony_request' => true,  // Only one can be enabled..
73         'mail'            => true,  // Catch mail messages
74         'laravel'         => false, // Laravel version and environment
75         'events'          => false, // All events fired
76         'default_request' => false, // Regular or special Symfony request logger
77         'logs'            => false, // Add the latest log messages
78         'files'           => false, // Show the included files
79         'config'          => false, // Display config settings
80         'cache'           => false, // Display cache events
81         'models'          => true, // Display models
82     ],
83
84     // Configure some DataCollectors
85     'options' => [
86         'auth' => [
87             'show_name' => true,   // Also show the users name/email in the debugbar
88         ],
89         'db' => [
90             'with_params'       => true,   // Render SQL with the parameters substituted
91             'backtrace'         => true,   // Use a backtrace to find the origin of the query in your files.
92             'timeline'          => false,  // Add the queries to the timeline
93             'explain'           => [                 // Show EXPLAIN output on queries
94                 'enabled' => false,
95                 'types'   => ['SELECT'],     // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
96             ],
97             'hints'             => true,    // Show hints for common mistakes
98         ],
99         'mail' => [
100             'full_log' => false,
101         ],
102         'views' => [
103             'data' => false,    //Note: Can slow down the application, because the data can be quite large..
104         ],
105         'route' => [
106             'label' => true,  // show complete route on bar
107         ],
108         'logs' => [
109             'file' => null,
110         ],
111         'cache' => [
112             'values' => true, // collect cache values
113         ],
114     ],
115
116     // Inject Debugbar into the response
117     // Usually, the debugbar is added just before </body>, by listening to the
118     // Response after the App is done. If you disable this, you have to add them
119     // in your template yourself. See http://phpdebugbar.com/docs/rendering.html
120     'inject' => true,
121
122     // DebugBar route prefix
123     // Sometimes you want to set route prefix to be used by DebugBar to load
124     // its resources from. Usually the need comes from misconfigured web server or
125     // from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
126     'route_prefix' => '_debugbar',
127
128     // DebugBar route domain
129     // By default DebugBar route served from the same domain that request served.
130     // To override default domain, specify it as a non-empty value.
131     'route_domain' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''),
132 ];
Morty Proxy This is a proxified and sanitized view of the page, visit original site.