Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to api.openstreetmap.org API host #123

Closed
wants to merge 3 commits into from

Conversation

danieldegroot2
Copy link

@danieldegroot2 danieldegroot2 commented Oct 12, 2023

Use api.openstreetmap.org/api/ -and HTTPS- instead of www.openstreetmap.org/api/*.

(Is: openstreetmap/operations#951)

Except for regular link in README.md and index.html.

PR will initially be marked as a draft, as there seem to be unresolved issues upstream.

cc: @bhousel

@bhousel
Copy link
Member

bhousel commented Oct 23, 2023

Looking into this today..
Weirdly it seems like the /oauth2 related endpoints are the only thing that doesn't work when using api.openstreetmap.org.

When I try it, I get a "301 Moved Permanently" redirect, which triggers a CORS error.

There is some discussion on openstreetmap/operations#951 about it.

@danieldegroot2
Copy link
Author

Yes, this is the reason I personally made this a draft as mentioned above.

@bhousel
Copy link
Member

bhousel commented Oct 24, 2023

I ended up just copying what @tyrasd did in openstreetmap/iD@c4d1390 by making separate url and apiUrl properties. This way it remains backward compatible (url still performs the handshake).

@tsmock
Copy link

tsmock commented Nov 2, 2023

Since this PR is being linked from all over the place, I'll copy what I said in westnordost/osmapi#33 (comment) .


Realistically the RFC 8414 compliant endpoints should be used. Those would be https://www.openstreetmap.org/.well-known/oauth-authorization-server and https://api.openstreetmap.org/.well-known/oauth-authorization-server (which redirects to www). The JOSM code does look for that on non-OSM endpoints, but that will probably change so that we don't have URL endpoints hardcoded into the application [for OSM].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants