You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there wasn't a ticket created for this — or perhaps I missed it — but I’ve fixed the issue with map styles not loading currently on the staging.
The problem was due to outdated paths still being used by the Wiki and some third-party apps. For example, there are still referencing map-styles/main/main.json, but the correct and updated path is now map-styles/historical/historical.json.
To resolve this, I updated the Apache configuration in the web container to include proper redirection rules. These are now in place:
https://staging.openhistoricalmap.org/map-styles/woodblock/woodblock.json → no changes
I was trying to redirect the old map-style URLs like /map-styles/main/main.json to the new ones using a 301 redirect. Even though I added the correct CORS headers, the browser kept blocking the request due to security restrictions with redirects.
I tested several solutions, and while everything worked fine with curl, the browser still failed.
So, I decided to use permanent URLs directly and configured an internal rewrite on the server like this:
This avoids external redirection and makes everything work properly with CORS, so the URLs will still work while pointing to the new map-styles files. e.g staging 👇
Activity
Rub21 commentedon Mar 28, 2025
I've just deploy the improvements in production all the map-styles are redirecting now.
https://www.openhistoricalmap.org/map-styles/main/main.json
https://www.openhistoricalmap.org/map-styles/rail/rail.json
https://www.openhistoricalmap.org/map-styles/japanese_scroll/ohm-japanese-scroll-map.json
https://www.openhistoricalmap.org/map-styles/woodblock/woodblock.json
Rub21 commentedon Apr 1, 2025
I was trying to redirect the old map-style URLs like /map-styles/main/main.json to the new ones using a 301 redirect. Even though I added the correct CORS headers, the browser kept blocking the request due to security restrictions with redirects.
I tested several solutions, and while everything worked fine with curl, the browser still failed.
So, I decided to use permanent URLs directly and configured an internal rewrite on the server like this:
This avoids external redirection and makes everything work properly with CORS, so the URLs will still work while pointing to the new map-styles files. e.g staging 👇
https://staging.openhistoricalmap.org/map-styles/main/main.json
https://staging.openhistoricalmap.org/map-styles/rail/rail.json
https://staging.openhistoricalmap.org/map-styles/japanese_scroll/ohm-japanese-scroll-map.json
https://staging.openhistoricalmap.org/map-styles/woodblock/woodblock.json
cc. @danrademacher @1ec5 @batpad
Rub21 commentedon Apr 3, 2025
Currently, the old map-style URLs are redirecting to their newer equivalents:
https://www.openhistoricalmap.org/map-styles/main/main.json→https://www.openhistoricalmap.org/map-styles/historical/historical.jsonhttps://www.openhistoricalmap.org/map-styles/rail/rail.json→https://www.openhistoricalmap.org/map-styles/railway/railway.jsonhttps://www.openhistoricalmap.org/map-styles/japanese_scroll/ohm-japanese-scroll-map.json→https://www.openhistoricalmap.org/map-styles/japanese_scroll/japanese_scroll.jsonThis ensures legacy links still working but referencing to the new map-styles files
danrademacher commentedon Apr 8, 2025
Confirmed these are working as expected