From: Markus Staab Date: Wed, 25 Apr 2018 16:10:47 +0000 (+0200) Subject: Bug 1430367 - "preconnect" to google-analytics domain for improved performance X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91631953125a743702cbd6783b7d889721db3bbc;p=thirdparty%2Fbugzilla.git Bug 1430367 - "preconnect" to google-analytics domain for improved performance --- 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('; rel="preload"; as="font"', Bugzilla->VERSION, $_) } @fonts); + if (Bugzilla->params->{google_analytics_tracking_id}) { + $headers{'-link'} .= ', ; rel="preconnect"; crossorigin'; + } } return $self->SUPER::header(%headers) || "";