add webgui specific environment debug panel to filter out session
This commit is contained in:
parent
a53f1cdede
commit
f728107e78
2 changed files with 21 additions and 1 deletions
20
lib/WebGUI/Middleware/Debug/Environment.pm
Normal file
20
lib/WebGUI/Middleware/Debug/Environment.pm
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package WebGUI::Middleware::Debug::Environment;
|
||||
use 5.008;
|
||||
use strict;
|
||||
use warnings;
|
||||
use parent qw(Plack::Middleware::Debug::Environment);
|
||||
our $VERSION = '0.01';
|
||||
|
||||
sub run {
|
||||
my ($self, $env, $panel) = @_;
|
||||
|
||||
my $filtered_env = { %$env };
|
||||
|
||||
delete $filtered_env->{'plack.debug.panels'};
|
||||
$filtered_env->{'webgui.session'} &&= 'bless({ ... }, "WebGUI::Session")';
|
||||
|
||||
$self->SUPER::run($filtered_env, $panel);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue