From: Marius Gavrilescu Date: Sun, 9 Feb 2014 20:59:21 +0000 (+0200) Subject: Return 200 OK when PATH_INFO is /ok X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=819b82bbd1ade0d09e0b928bc80bb21eec7376d1;p=plack-app-gruntmaster.git Return 200 OK when PATH_INFO is /ok --- diff --git a/app.psgi b/app.psgi index 64e3f28..56022bc 100644 --- a/app.psgi +++ b/app.psgi @@ -72,6 +72,7 @@ Log::Log4perl->init('log.conf'); my $access_logger = Log::Log4perl->get_logger('access'); builder { + enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }}; enable 'AccessLog', format => ACCESSLOG_FORMAT, logger => sub { $access_logger->info(@_) }; enable 'ContentLength'; enable_if { $_[0]->{PATH_INFO} =~ qr,^/static/,} Header => set => ['Cache-Control', 'public, max-age=604800'];