From 6b9e70573bd21631f0e320c3aadecc7e0be70aa0 Mon Sep 17 00:00:00 2001 From: Richard Fairhurst Date: Mon, 2 Feb 2015 01:32:48 +0000 Subject: [PATCH] Use document.location.protocol for OSRM --- app/assets/javascripts/index/directions/osrm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index cc2756858..05cb32f20 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -31,7 +31,7 @@ function OSRMEngine() { I18n.t('javascripts.directions.instructions.end_oneway') // 17 ]; - var url = "http://router.project-osrm.org/viaroute?z=14&output=json&instructions=true"; + var url = document.location.protocol + "//router.project-osrm.org/viaroute?z=14&output=json&instructions=true"; for (var i = 0; i < points.length; i++) { url += "&loc=" + points[i].lat + ',' + points[i].lng; -- 2.39.5