X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=app.psgi;h=eee1ad7b69211a6afa50e1d444c6a6c1ded1957f;hb=838663d1450cf5606e59c30966e2e56b0f787416;hp=7bc7437ea97aea04b0c4d2826aedbf1db1eb745f;hpb=3e9c060abdcab012619d36d2532ea2028f47f685;p=gruntmaster-page.git diff --git a/app.psgi b/app.psgi index 7bc7437..eee1ad7 100644 --- a/app.psgi +++ b/app.psgi @@ -17,9 +17,9 @@ default-src 'none' connect-src 'self' form-action 'self' frame-ancestors 'none' -img-src 'self' https://static.mindcoding.ro www.google-analytics.com +img-src 'self' https://static.mindcoding.ro referrer origin-when-cross-origin -script-src https://static.mindcoding.ro/static/js.js https://www.google-analytics.com/analytics.js +script-src https://static.mindcoding.ro/static/js.js style-src https://static.mindcoding.ro/static/css/ CSP chomp $csp; @@ -44,6 +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', '; 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;