X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=app.psgi;h=eee1ad7b69211a6afa50e1d444c6a6c1ded1957f;hb=838663d1450cf5606e59c30966e2e56b0f787416;hp=be72e9b18b9bd2fa4dd7ea7317d41d84a44e035c;hpb=2ca77f50fce7c0cc299359a766058240255941f5;p=gruntmaster-page.git diff --git a/app.psgi b/app.psgi index be72e9b..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 https://www.google-analytics.com/collect +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;