nasa / api-docs

api.nasa.gov
http://nasa.github.io/api-docs/
429 stars 106 forks source link

CORS restrictions for https://ntrs.nasa.gov/api/ #161

Open jumpjack opened 2 years ago

jumpjack commented 2 years ago

I cannot use this api programmatically, due to CORS restrictions, hence which is its use case? The web interface is terrible, it returns all fields for all results! https://ntrs.nasa.gov/

oller commented 2 years ago

I'm encountering CORS issues trying to access : https://ssd-api.jpl.nasa.gov/ for their fireball API https://ssd-api.jpl.nasa.gov/doc/fireball.html

I believe this is a regression on the API side?

Aze1337 commented 1 year ago

Hello,

do you still need help ? can you provide more informations ? are you trying to do a request on your own, or using it directly inside a web page of yours ? have you tried playing with the referer header ?

oller commented 1 year ago

Hi @Aze1337 thanks for the response.

I just tried again, I'm doing this from a javascript app hosted on github pages. The request continues to be blocked from localhost and also when hosted.

Access to XMLHttpRequest at 'https://ssd-api.jpl.nasa.gov/fireball.api?req-loc=true' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.