From 28aeef34bd56449cb938dc86a563fd44b05a4a2d Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 19 Dec 2014 14:11:36 +0200 Subject: [PATCH] Do not log requests to /ok --- app.psgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.psgi b/app.psgi index 2c264f9..a2a62ef 100644 --- 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 } -- 2.39.2