]> iEval git - gruntmaster-page.git/commitdiff
Return 200 OK when PATH_INFO is /ok
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Feb 2014 20:59:21 +0000 (22:59 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Feb 2014 20:59:21 +0000 (22:59 +0200)
app.psgi

index 64e3f289cbd6ae69fa5cf61137f760815e99a7d1..56022bc727880ff490ff33545981890d1c635c50 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -72,6 +72,7 @@ Log::Log4perl->init('log.conf');
 my $access_logger = Log::Log4perl->get_logger('access');
 
 builder {
 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'];
        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'];
This page took 0.020426 seconds and 4 git commands to generate.