]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 14:07:28 +0000 (16:07 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 14:07:28 +0000 (16:07 +0200)
1  2 
app.psgi

diff --combined app.psgi
index 323748dc187169003ee5351db4191584ece46163,8fbc2c01337e9f910105510c77bea4fc6b95bdad..597e94167d5eebc968ea5e80ce6f66dd0937fe99
+++ b/app.psgi
@@@ -1,6 -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,18 -8,16 +8,16 @@@ 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'
  connect-src 'self'
  form-action 'self'
  frame-ancestors 'none'
 -img-src 'self'
 +img-src 'self' https://static.mindcoding.ro
  referrer origin-when-cross-origin
 -script-src 'self'
 -style-src 'self'
 +script-src https://static.mindcoding.ro/static/js.js
 +style-src https://static.mindcoding.ro/static/css/
  CSP
        chomp $csp;
        $csp =~ s/\n/; /gr;
@@@ -43,7 -41,8 +41,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/,;
 +              $hdrs->set('Link', '<https://static.mindcoding.ro/static/slate.css>; rel=stylesheet') if $hdrs->get('Content-Type') =~ m,^text/html,;
                $resp->[1] = $hdrs->headers;
                $resp;
        }
@@@ -56,6 -55,7 +54,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.031553 seconds and 4 git commands to generate.