Send 5% of users tiles over https as a test
authorTom Hughes <tom@compton.nu>
Wed, 5 Feb 2014 18:38:36 +0000 (18:38 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 5 Feb 2014 18:38:36 +0000 (18:38 +0000)
app/assets/javascripts/application.js

index 7072b7c..dd44ea1 100644 (file)
@@ -138,3 +138,7 @@ $(document).ready(function () {
     $("header").toggleClass("closed");
   });
 });
+
+if (Math.random() * 100 < 5) {
+  L.OSM.Mapnik.prototype.options.url = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+}