Samples icon indicating copy to clipboard operation
Samples copied to clipboard

Unable to get access to the api

Open aneesafatima opened this issue 1 year ago • 1 comments

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.

aneesafatima avatar Jun 18 '24 11:06 aneesafatima

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

astroanu avatar Jul 08 '24 05:07 astroanu