From b834bd70d0e926f8775558742213d88e3ba000b3 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 8 Nov 2023 12:41:30 +0100 Subject: [PATCH] use api.openstreetmap.org for API calls when running on www.osm.org see https://github.com/openstreetmap/operations/issues/951 --- app/assets/javascripts/id.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/id.js b/app/assets/javascripts/id.js index 2d0d01a6fd..8c0a061ddc 100644 --- a/app/assets/javascripts/id.js +++ b/app/assets/javascripts/id.js @@ -13,8 +13,10 @@ document.addEventListener("DOMContentLoaded", function () { } else { var idContext = iD.coreContext(); idContext.connection().apiConnections([]); + var url = location.protocol + "//" + location.host; idContext.preauth({ - url: location.protocol + "//" + location.host, + url: url, + apiUrl: url === "https://www.openstreetmap.org" ? "https://api.openstreetmap.org" : url, access_token: container.dataset.token });