Steps to Reproduce
- Access https://en.wikivoyage.org/wiki/Talk:Prague#Wikidata_items_for_dynamic_map
- Look at the network requests and see that some requests fulfill without a problem and others are canceled due to the lack of access-control-allow-origin header
Expected Results
- All requests to maps.wikimedia.org should return access-control-allow-origin header
Actual Results
- The presence of access-control-allow-origin header is inconsistent and random
Environments Observed
- English Wikivoyage
Additional notes
- The ticket was formerly about 429 errors, which is not reproducible at the moment, the history will be preserved for context.
Recently, when I open pages with multi-region maps, the dinamic map fails to load, only the static fallback image is shown. The Kartographer extension tries to load GeoJSON for each regions, but some of them are rejected by the server 'maps.wikimedia.org' with response '429 Too Many Requests'.
It can be easily reproduced on the following pages:
https://en.wikivoyage.org/w/index.php?title=Paris&oldid=3897346#Districts
https://en.wikivoyage.org/w/index.php?title=Vienna&oldid=3897365#Districts
https://en.wikivoyage.org/w/index.php?title=Budapest&oldid=3895843#DistrictsPossible solutions are:
- Configure the map server to allow more mapshape requests per client at once.
- Modify the client JavaScript code to not load mapshapes in parallel, just after each other.
- Implement some caching mechanism to reduce the number of requests, and reduce load.
Related discussion:
https://en.wikivoyage.org/wiki/Wikivoyage_talk:Mapmaking_Expedition#Too_Many_Requests_on_loading_complex_dynamic_maps