X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e6dbf56d43de52513a9e80367d8c2eb4e7bc21a1..8e19f2c7f0a216fa1f1e2d20ccd5791379fbbb50:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index ee44ad4c4..18466864b 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -327,14 +327,14 @@ OSM.Directions = function (map) { } var chosenEngineIndex = findEngine("fossgis_osrm_car"); - if ($.cookie("_osm_directions_engine")) { - chosenEngineIndex = findEngine($.cookie("_osm_directions_engine")); + if (Cookies.get("_osm_directions_engine")) { + chosenEngineIndex = findEngine(Cookies.get("_osm_directions_engine")); } setEngine(chosenEngineIndex); select.on("change", function (e) { chosenEngine = engines[e.target.selectedIndex]; - $.cookie("_osm_directions_engine", chosenEngine.id, { expires: expiry, path: "/" }); + Cookies.set("_osm_directions_engine", chosenEngine.id, { secure: true, expires: expiry, path: "/", samesite: "lax" }); getRoute(true, true); });