summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Staab <maggus.staab@googlemail.com>2018-04-25 18:10:47 +0200
committerdklawren <dklawren@users.noreply.github.com>2018-04-25 18:10:47 +0200
commit91631953125a743702cbd6783b7d889721db3bbc (patch)
tree83f24189c52db6af3b4bd77ed36a68e55b38e45b
parent396ac9ccd1170b42c14bc50d7706be657a4fb114 (diff)
downloadbugzilla-91631953125a743702cbd6783b7d889721db3bbc.tar.gz
bugzilla-91631953125a743702cbd6783b7d889721db3bbc.tar.xz
Bug 1430367 - "preconnect" to google-analytics domain for improved performance
-rw-r--r--Bugzilla/CGI.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index b0bc15e78..6e48a2355 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -590,6 +590,9 @@ sub header {
"skins/standard/fonts/MaterialIcons-Regular.woff2",
);
$headers{'-link'} = join(", ", map { sprintf('</static/v%s/%s>; rel="preload"; as="font"', Bugzilla->VERSION, $_) } @fonts);
+ if (Bugzilla->params->{google_analytics_tracking_id}) {
+ $headers{'-link'} .= ', <https://www.google-analytics.com>; rel="preconnect"; crossorigin';
+ }
}
return $self->SUPER::header(%headers) || "";