]> iEval git - gruntmaster-page.git/blobdiff - app.psgi
Remove access logging
[gruntmaster-page.git] / app.psgi
index 53721091fb1bf799c058206d811e4bfc12eaf186..1181e13d4bf718702fc5b6e31758058e29ddc613 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -9,7 +9,6 @@ use Plack::Util;
 use Log::Log4perl;
 
 use constant AUTH_TIMEOUT => 5 * 60;
-use constant ACCESSLOG_FORMAT => 'combined';
 
 sub CONTENT_SECURITY_POLICY () {
        my $csp = <<CSP;
@@ -44,6 +43,7 @@ sub add_headers {
                my $resp = $app->($_[0]);
                my $hdrs = Plack::Util::headers($resp->[1]);
                $hdrs->set('Content-Security-Policy', CONTENT_SECURITY_POLICY);
+               $hdrs->set('Link', '</static/cyborg.css>; rel=stylesheet') if $hdrs->get('Content-Type') =~ m,^text/html,;
                $hdrs->set('Cache-Control', 'public, max-age=604800') if $_[0]->{PATH_INFO} =~ qr,^/static/,;
                $resp->[1] = $hdrs->headers;
                $resp;
@@ -51,12 +51,10 @@ sub add_headers {
 }
 
 Log::Log4perl->init_once('log.conf');
-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/,;
This page took 0.017037 seconds and 4 git commands to generate.