Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Commit 53dcce3

Browse files
bernardotavaresbernardotavaresLuke Towers
authored
New store_all_requests config value (#43)
Co-authored-by: bernardotavares <bernardopt@goparity.com> Co-authored-by: Luke Towers <github@luketowers.ca>
1 parent 9420160 commit 53dcce3

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

config/config.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@
3232

3333
'allow_public_access' => false,
3434

35+
/*
36+
|--------------------------------------------------------------------------
37+
| Store all requests
38+
|--------------------------------------------------------------------------
39+
|
40+
| For security reasons the debugbar will only store requests by a
41+
| backend user with the rainlab.debugbar.access_debugbar permission.
42+
|
43+
| If you are not concerned about security (for instance, you are in
44+
| a local environment) you can set this to true to log all requests.
45+
|
46+
| Usefull if you want to log requests from Postman without having to worry
47+
| about authentication. WARNING: All stored requests are publicly available without
48+
| any authentication, so do NOT enable this on an environment that's exposed to the
49+
| internet.
50+
51+
|
52+
*/
53+
54+
'store_all_requests' => false,
55+
56+
3557
/*
3658
|--------------------------------------------------------------------------
3759
| Routes to exclude
@@ -230,4 +252,4 @@
230252
*/
231253

232254
'route_domain' => null,
233-
];
255+
];

middleware/InjectDebugbar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public function handle($request, Closure $next)
3737

3838
$user = BackendAuth::getUser();
3939

40-
if (!$user || !$user->hasAccess('rainlab.debugbar.access_stored_requests')) {
40+
if ((!$user || !$user->hasAccess('rainlab.debugbar.access_stored_requests')) &&
41+
!Config::get('rainlab.debugbar::store_all_requests', false)) {
4142
// Disable stored requests
4243
// Note: this will completely disable storing requests from any users
4344
// without the required permission. If that functionality is desired again

0 commit comments

Comments
 (0)