diff options
author | Markus Staab <maggus.staab@googlemail.com> | 2018-04-25 18:10:47 +0200 |
---|---|---|
committer | dklawren <dklawren@users.noreply.github.com> | 2018-04-25 18:10:47 +0200 |
commit | 91631953125a743702cbd6783b7d889721db3bbc (patch) | |
tree | 83f24189c52db6af3b4bd77ed36a68e55b38e45b | |
parent | 396ac9ccd1170b42c14bc50d7706be657a4fb114 (diff) | |
download | bugzilla-91631953125a743702cbd6783b7d889721db3bbc.tar.gz bugzilla-91631953125a743702cbd6783b7d889721db3bbc.tar.xz |
Bug 1430367 - "preconnect" to google-analytics domain for improved performance
-rw-r--r-- | Bugzilla/CGI.pm | 3 |
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) || ""; |