X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1add511c52e21492d3dd08b5a86e1f04e73791eb..6b9e70573bd21631f0e320c3aadecc7e0be70aa0:/app/assets/javascripts/index/directions/osrm.js 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;