From ef371a508da6765f5ac543e96ab7d43c6b6b03a6 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 10 Mar 2018 12:03:23 -0600 Subject: [PATCH] Change check on debugbar to use debug not environment --- CHANGELOG.md | 1 + app/Http/Middleware/Api/SetSessionDriver.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57419d185..68d057df8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Fixes a UI error when attempting to change the default Nest and Egg for an existing server. * Correct permissions check in UI to allow subusers with permission to `view-allocations` the ability to actually see the sidebar link. * Fixes improper behavior when marking an egg as copying the configuration from another. +* Debug bar is only checked when the app is set to debug mode in the API session handler, rather than when it is in local mode to match the plugin settings. ### Changed * Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline. diff --git a/app/Http/Middleware/Api/SetSessionDriver.php b/app/Http/Middleware/Api/SetSessionDriver.php index c69311a65..3d5c16617 100644 --- a/app/Http/Middleware/Api/SetSessionDriver.php +++ b/app/Http/Middleware/Api/SetSessionDriver.php @@ -41,7 +41,7 @@ class SetSessionDriver */ public function handle(Request $request, Closure $next) { - if ($this->app->environment() !== 'production') { + if ($this->config->get('app.debug')) { $this->app->make(LaravelDebugbar::class)->disable(); }