juliuste / direkt.bahn.guru

All direct long-distance railway connections for cities in and beyond central Europe.
https://direkt.bahn.guru
GNU General Public License v3.0
368 stars 24 forks source link

Request failed because of Cross Origin Policy #5

Closed EnricoVogt closed 2 years ago

EnricoVogt commented 2 years ago

Access to XMLHttpRequest at 'https://v5.db.transport.rest/locations?query=8000207' from origin 'https://direkt.bahn.guru' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. bundle.js:5209 GET https://v5.db.transport.rest/locations?query=8000207 net::ERR_FAILED 502

derhuerst commented 2 years ago

This is probably because the API's load balancer responds with a 502 without adding CORS headers. Can you confirm that @juliuste?

juliuste commented 2 years ago

The CORS error that was logged was just the symptom of the underlying API being down. Issue should be fixed (for now). Please re-open if the problem resurfaces.