I’m having issues where I can’t seem to get any data from the termination API. If I hit, say, https://online-go.com/termination-api/automatch-stats?ranks=2,3,4,5,6,7,8’ from a web browser, I get CORS errors (annoying, but fine). If I curl that same endpoint, I get back data:
curl 'https://online-go.com/termination-api/automatch-stats?ranks=2,3,4,5,6,7,8' \
-H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1' \
-H 'Content-Type: application/json' \
-H 'Referer: http://localhost:5173/'
{"9x9":{"blitz":{"byoyomi":2,"fischer":12},"rapid":{"byoyomi":18,"fischer":49},"live":{"byoyomi":10,"fischer":8},"correspondence":{"byoyomi":0,"fischer":0}},"13x13":{"blitz":{"byoyomi":0,"fischer":0},"rapid":{"byoyomi":7,"fischer":4},"live":{"byoyomi":0,"fischer":0},"correspondence":{"byoyomi":0,"fischer":0}},"19x19":{"blitz":{"byoyomi":0,"fischer":5},"rapid":{"byoyomi":6,"fischer":8},"live":{"byoyomi":0,"fischer":2},"correspondence":{"byoyomi":0,"fischer":0}}}
Bafflingly, if I hit the same endpoint from my iOS app (i.e. not subject to CORS restrictions), it fails, in a way I don’t get good insight into. There are other OGS API endpoints that have CORS restrictions in browser, but work fine for me on iOS — I have no idea why termination-api specifically is failing for me on iOS. Any termination-api endpoint has the same problem.
The fact that a clean CURL works suggests this may be an error on my half of the connection, but it still could be server-side configuration blocking some requests but not others (proxy settings, firewall, etc). I’m curious if anyone else has run into this issue before.