]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing.js.erb
Don't show http-only routers to users on https
[rails.git] / app / assets / javascripts / routing.js.erb
index 42e4ba2bc57222d66a2279c47b2aee40149b0fb4..84bf178328954205c4ade68ca92f68eb4da71a10 100644 (file)
@@ -18,7 +18,10 @@ var ROUTING_POLYLINE_HIGHLIGHT={
 
 
 OSM.RoutingEngines={
 
 
 OSM.RoutingEngines={
-    list: []
+    list: [],
+    add: function(supportsHTTPS,engine) {
+        if (document.location.protocol=="http:" || supportsHTTPS) this.list.push(engine);
+    }
 };
 
 OSM.Routing=function(map,name,jqSearch) {
 };
 
 OSM.Routing=function(map,name,jqSearch) {