]> iEval git - gruntmaster-page.git/blobdiff - app.psgi
Merge branch 'master' into newmc
[gruntmaster-page.git] / app.psgi
index f7c85ffec3149dbd1bba33486039966bb74dfd92..eee1ad7b69211a6afa50e1d444c6a6c1ded1957f 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -9,7 +9,7 @@ use Plack::Util;
 use Log::Log4perl;
 
 use constant AUTH_TIMEOUT => 5 * 60;
-use constant ACCESSLOG_FORMAT => 'combined';
+use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
 
 sub CONTENT_SECURITY_POLICY () {
        my $csp = <<CSP;
@@ -17,10 +17,10 @@ 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;
@@ -44,7 +44,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('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.023979 seconds and 4 git commands to generate.