svn commit: r45832 - head/en_US.ISO8859-1/htdocs/layout/js

Gavin Atkinson <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
Author: gavin
Date: Tue Oct 14 23:32:42 2014
New Revision: 45832
URL: https://svnweb.freebsd.org/changeset/doc/45832

Log:
  Ensure the Google Analytics code only runs when served from FreeBSD.org
  or google.com servers.  This was always the intention, but due to a bug
  it would also run when (for example) accessed via
  http://www.freebsd.org.nyud.net.
  
  Approved by:	webstats (eadler)

Modified:
  head/en_US.ISO8859-1/htdocs/layout/js/google.js

Modified: head/en_US.ISO8859-1/htdocs/layout/js/google.js
==============================================================================
--- head/en_US.ISO8859-1/htdocs/layout/js/google.js	Tue Oct 14 22:08:07 2014	(r45831)
+++ head/en_US.ISO8859-1/htdocs/layout/js/google.js	Tue Oct 14 23:32:42 2014	(r45832)
@@ -11,12 +11,12 @@
 var enable_ga = true;
 var allow_track = true;
 
-var h = document.location.host;
+var h = document.location.hostname;
 /*
  * Check that the hosting domain is actually a FreeBSD.org domain, so
  * we don't accidentally obtain data from mirrors.
  */
-var fbsdregex = /((docs|security|svnweb|wiki|www)\.freebsd\.org|google\.com)/i;
+var fbsdregex = /((docs|security|svnweb|wiki|www)\.freebsd\.org|google\.com)$/i;
 
 if (typeof navigator.doNotTrack !== "undefined" && (navigator.doNotTrack == "yes" || navigator.doNotTrack == "1")) {
 	allow_track = false;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.