Skip to content

Commit

Permalink
small adjustments to session middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jun 17, 2010
1 parent 18525e7 commit 29428d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/WebGUI/Middleware/Session.pm
Expand Up @@ -3,10 +3,8 @@ use strict;
use parent qw(Plack::Middleware);
use WebGUI::Config;
use WebGUI::Session;
use WebGUI::Utility ();
use Try::Tiny;
use WebGUI::Middleware::HTTPExceptions;
use Plack::Middleware::SimpleLogger;
use Plack::Util::Accessor qw( config );

=head1 NAME
Expand Down Expand Up @@ -37,6 +35,7 @@ sub call {

# Logger fallback
if (!$env->{'psgix.logger'}) {
require Plack::Middleware::SimpleLogger;
$app = Plack::Middleware::SimpleLogger->wrap( $app );
}

Expand Down Expand Up @@ -87,7 +86,7 @@ sub canShowDebug {
if $ips eq '';
$ips =~ s/\s+//g;
my @ips = split /,/, $ips;
my $ok = WebGUI::Utility::isInSubnet($session->env->getIp, [ @ips ] );
my $ok = Net::CIDR::Lite->new(@ips)->find($env->{REMOTE_ADDR});
return $ok;
}

Expand Down

0 comments on commit 29428d7

Please sign in to comment.