]> iEval git - gruntmaster-page.git/blobdiff - app.psgi
Merge branch 'master' into newmc
[gruntmaster-page.git] / app.psgi
index b5fd756387632198ebf89e3cae6e8bacd0aada7f..837dd60ab51e100408d84934eb6d7fd80a4a724c 100644 (file)
--- 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 = <<CSP;
 default-src 'none'
@@ -18,8 +16,8 @@ form-action 'self'
 frame-ancestors 'none'
 img-src 'self' https://static.mindcoding.ro
 referrer origin-when-cross-origin
-script-src https://static.mindcoding.ro/static/js.js
-style-src https://static.mindcoding.ro/static/css/
+script-src 'self'
+style-src 'self'
 CSP
        chomp $csp;
        $csp =~ s/\n/; /gr;
@@ -43,7 +41,6 @@ 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', '<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;
This page took 0.017689 seconds and 4 git commands to generate.