Qrzy/bgg-xml-api-client

CORS Error

essbaa opened this issue · 2 comments

essbaa commented

any idea how to get the data back. I am getting a CORS error when calling inside my project. but when i try the api call in browser it works

https://boardgamegeek.com/xmlapi2/search?query=Blood+rage&type=boardgame&exact=1

Qrzy commented

Sadly, it's not totally obvious when does it allow CORS, but certainly it doesn't always, as it may be read in this forum topic:
https://boardgamegeek.com/thread/2624587/need-help-understanding-why-api-sometimes-fails-an
:(

Best way to tackle this, is to create own API proxy, so that those will be server2server calls where CORS rules don't apply.

essbaa commented

It is working now after trying your suggestion.

Thank you.