Not a bug
cross-origin error in angular
roizofiof 5 years ago • updated by Michael J. Radwin 5 months ago • 3
I'm trying to convert georgian date to hebrew date via your api but I get this error:
Access to XMLHttpRequest at 'https://www.hebcal.com/converter/?cfg=json&gy=2000&gm=12&gd=31&g2h=1' from origin 'http://localhost:4200' has been blocked by CORS policy: Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers in preflight response.
I am using angular observable.
What I need to do?
Customer support service by UserEcho
Glad you got it working!
Our API tries to be very open when it comes to CORS. We always include Access-Control-Allow-Origin: * in the response when the cfg parameter is set to json.
No authentication or authorization is required to use our API. It is accessible to a wide range of users without restrictions.
I tried it with fetch rather than axios and it worked
I am trying to use the Jewish calendar REST API in a React app
However, I get this error:
Request header field x-csrf-token is not allowed by Access-Control-Allow-Headers in preflight response.