AstronomyAPI / Samples

Examples for Astronomy API
https://astronomyapi.com
MIT License
30 stars 3 forks source link

Unable to get access to the api #72

Closed aneesafatima closed 2 months ago

aneesafatima commented 4 months ago

I have created an application with this origin http://localhost:5173 but despite that I keep getting this error

Access to fetch at 'https://api.astronomyapi.com/api/v2/bodies/events/Sun?latitude=22.57620861111111&longitude=88.35759838888889&elevation=15&from_date=2024-06-18&to_date=2024-07-18&time=17:19:12' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Please help.

astroanu commented 3 months ago

Could you please put a code sample so I can check?