summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Staab <maggus.staab@googlemail.com>2018-01-12 20:01:31 +0100
committerDylan William Hardison <dylan@hardison.net>2018-01-12 20:01:31 +0100
commit116b74a0027b61c61142ef2aed73651af5db3d1d (patch)
tree570966da39d07750308435b6c0adeb4d80175f9f
parent7861c1d1d4a1b32619c0e36f985ecc4ff8c7ab8b (diff)
downloadbugzilla-116b74a0027b61c61142ef2aed73651af5db3d1d.tar.gz
bugzilla-116b74a0027b61c61142ef2aed73651af5db3d1d.tar.xz
Bug 1426414 - Send preload headers for webfonts
-rw-r--r--Bugzilla/CGI.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 88a061844..f8a4bdbac 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -513,6 +513,16 @@ sub header {
);
$self->{_header_done} = 1;
+ my @fonts = (
+ "skins/standard/fonts/FiraMono-Regular.woff2?v=3.202",
+ "skins/standard/fonts/FiraSans-Bold.woff2?v=4.203",
+ "skins/standard/fonts/FiraSans-Italic.woff2?v=4.203",
+ "skins/standard/fonts/FiraSans-Regular.woff2?v=4.203",
+ "skins/standard/fonts/FiraSans-SemiBold.woff2?v=4.203",
+ "skins/standard/fonts/MaterialIcons-Regular.woff2",
+ );
+ $headers{'-link'} = join(", ", map { sprintf('</static/v%s/%s>; rel="preload"; as="font"', Bugzilla->VERSION, $_) } @fonts);
+
return $self->SUPER::header(%headers) || "";
}