X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=app.psgi;h=b29127c24e3e1375ae8e65ea4c3ddddf98930beb;hb=8e3f7d1e659c971fe718b6dccd0b904ed2c0d35a;hp=1181e13d4bf718702fc5b6e31758058e29ddc613;hpb=93c81af3918c6e7478f3340a97ea2f2a3f0dd253;p=plack-app-gruntmaster.git diff --git a/app.psgi b/app.psgi index 1181e13..b29127c 100644 --- a/app.psgi +++ b/app.psgi @@ -1,6 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use v5.14; -no if $] >= 5.017011, warnings => 'experimental::smartmatch'; +use warnings; use Gruntmaster::Data; use Plack::App::Gruntmaster; @@ -8,8 +8,6 @@ use Plack::Builder; use Plack::Util; use Log::Log4perl; -use constant AUTH_TIMEOUT => 5 * 60; - sub CONTENT_SECURITY_POLICY () { my $csp = <($_[0]); my $hdrs = Plack::Util::headers($resp->[1]); $hdrs->set('Content-Security-Policy', CONTENT_SECURITY_POLICY); - $hdrs->set('Link', '; 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;