Do not log requests to /ok
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 19 Dec 2014 12:11:36 +0000 (14:11 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 19 Dec 2014 12:11:36 +0000 (14:11 +0200)
app.psgi

index 2c264f9bc70fe7bfdd25cbb262642fe8bbc77959..a2a62ef716736a5f6b7e293f3c80516a60a7a547 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -45,13 +45,13 @@ my $access_logger = Log::Log4perl->get_logger('access');
 $ENV{DBIC_NULLABLE_KEY_NOWARN} = 1;
 
 builder {
+       enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }};
        enable 'AccessLog', format => ACCESSLOG_FORMAT, logger => sub { $access_logger->info(@_) };
        enable 'ContentLength';
        enable \&add_headers;
        enable 'Static', path => qr,^/static/,;
        enable 'Log4perl', category => 'plack';
        enable_if { shift->{HTTP_AUTHORIZATION} } 'Auth::Basic', authenticator => \&authenticate, realm => 'Gruntmaster 6000';
-       enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }};
        enable sub { my $app = $_[0]; sub { $_[0]->{'gruntmaster.dbic'} = $db; $app->($_[0]) } };
        Plack::App::Gruntmaster->run_if_script
 }
This page took 0.00997999999999999 seconds and 4 git commands to generate.