Skip to content

Fix iD API host per environment - #855

Merged
Rub21 merged 1 commit into
stagingfrom
fix-id-api-host
Sep 16, 2026
Merged

Rub21 merged 1 commit into
stagingfrom
fix-id-api-host

Conversation

@Rub21

@Rub21 Rub21 commented Sep 16, 2026

Copy link
Copy Markdown
Member

Fixes OpenHistoricalMap/issues#1377 - this comment.

id.js sets the API host with url.replace("www.openhistoricalmap.org", "api.openhistoricalmap.org"), and start.sh rewrote the first string to the current host. On staging and previews the replace then matched and iD sent every request to the production API, so saving failed with:
image

API_DOMAIN now sets the target per environment: api.ohmstaging.org, api.openhistoricalmap.org, and the preview's own host.

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.

API should send 'Access-Control-Allow-Origin' header only once

1 participant