eLearner
eLearner

Reputation: 335

How to allow Access Control Header to access a remote API in cross-domain?

I am developing a mobile application, I get my data through a remote API but my javascript program returns the following error:

XMLHttpRequest cannot load http://na.lolesports.com/api/standings.json?tournamentId=225. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ... is therefore not allowed access.

Upvotes: 1

Views: 620

Answers (1)

Daniel Cottone
Daniel Cottone

Reputation: 4480

There isn't anything you can do on your end, the CORS settings for the API would have to be changed. In fact, they are specifically not allowing cross-site origins because they don't want to allow third-party access to their API:

https://developer.riotgames.com/discussion/community-discussion/show/GokMZKKl

Upvotes: 3

Related Questions