Qrzy / bgg-xml-api-client

A simple library providing functions that return requested BGG data as JSON object.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS Error

essbaa opened this issue · comments

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

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.

commented

It is working now after trying your suggestion.

Thank you.