]> iEval git - plack-app-gruntmaster.git/commitdiff
Do not handle static files (nginx does this already)
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 27 Mar 2015 18:11:45 +0000 (20:11 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 27 Mar 2015 18:11:45 +0000 (20:11 +0200)
app.psgi

index b5fd756387632198ebf89e3cae6e8bacd0aada7f..323748dc187169003ee5351db4191584ece46163 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -44,7 +44,6 @@ sub add_headers {
                my $hdrs = Plack::Util::headers($resp->[1]);
                $hdrs->set('Content-Security-Policy', CONTENT_SECURITY_POLICY);
                $hdrs->set('Link', '<https://static.mindcoding.ro/static/slate.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;
        }
@@ -57,7 +56,6 @@ builder {
        enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }};
        enable 'ContentLength';
        enable \&add_headers;
-       enable 'Static', path => qr,^/static/,;
        enable 'Log4perl', category => 'plack';
        enable \&add_database;
        enable '+Plack::App::Gruntmaster::Auth',
This page took 0.028926 seconds and 4 git commands to generate.