peacecorps / peace-corps-countries-api

The Peace Corps Countries & Regions REST API provides read-only access and currently supports JSON data format. Developers, designers, engineers, and partners are all encouraged to leverage the Peace Corps Countries & Regions API to build innovative tools and/or creatively share this data.
4 stars 6 forks source link

CORS issue when accessing the rest api in javascript #4

Open memezilla opened 9 years ago

memezilla commented 9 years ago

I got the following error when i made requests to api using jquery.

XMLHttpRequest cannot load http://www.peacecorps.gov/api/v1/geography/countries/?current=true&suspended=false. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63342' is therefore not allowed access.

sshami commented 9 years ago

Thanks for bringing this to our attention. We are looking at enabling CORS for the API and will notify when that’s implemented.

sshami commented 9 years ago

CORS is now enabled for the API.