-#!/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;
use Plack::Util;
use Log::Log4perl;
-use constant AUTH_TIMEOUT => 5 * 60;
-
sub CONTENT_SECURITY_POLICY () {
my $csp = <<CSP;
default-src 'none'
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;