Skip to content

Commit

Permalink
use api.openstreetmap.org for API calls when running on www.osm.org
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Nov 8, 2023
1 parent 5c5695d commit b834bd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/assets/javascripts/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down

0 comments on commit b834bd7

Please sign in to comment.