Access-Control-Allow-Origin Error for jquery ajax call

Hello,
I am trying to make $.ajax call to fetch data from other server but the console gives Access-Control-Allow-Origin error.

I tried the same API url with the postman and its working!

Any idea?

This is by design for CORS - its implemented in the browser

https://www.codecademy.com/articles/what-is-cors

1 Like

I had similar issue. I’ve updated my nginx config based on this reference, once Nginx config is changed be sure to restart Nginx.

1 Like

I have tried this reference and restart Nginx but didn’t change anything!