nasa / api-docs

api.nasa.gov
http://nasa.github.io/api-docs/
451 stars 109 forks source link

CORS Issue with APOD API #108

Closed B-Lemke closed 5 years ago

B-Lemke commented 6 years ago

I have been making the following call and trying to get the image via the hdurl in the APOD API: https://api.nasa.gov/planetary/apod?date=2015-06-03&api_key=myKey

I will get the following error: Access to image at 'https://apod.nasa.gov/apod/image/1506/hyperion02_cassini_1024.jpg' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried using the https://api.nasa.gov/planetary/apod/direct?date=2015-06-03&api_key=DEMO_KEY call but that was not working. For a while I was able to trick my way around this and get it working with some browser plugins, but it's no longer working. Is it possible to enable CORS on the images so I can access them for my project?

JustinGOSSES commented 5 years ago

NO longer a problem

campbe13 commented 3 years ago

how did you fix it please, I am getting cors errors retrieving images, urls in the JSON returned by apod api

JustinGOSSES commented 3 years ago

Not seeing this error. Please provide more information on what exactly you're calling and how you're calling it. That will help people assist you in debugging

JustinGOSSES commented 3 years ago

Also please open new issue if necessary