Use document.location.protocol for OSRM