From: Marius Gavrilescu Date: Sun, 22 Mar 2015 19:51:46 +0000 (+0200) Subject: Use a Link: header with the default stylesheet X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6d4b4529219434f5d50dd28e17b6bda0e957864d;p=gruntmaster-page.git Use a Link: header with the default stylesheet --- diff --git a/app.psgi b/app.psgi index 5372109..f7c85ff 100644 --- a/app.psgi +++ b/app.psgi @@ -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;