Closed aneesafatima closed 2 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.
Could you please put a code sample so I can check?
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.