How to allow CORS in react.js?

后端 未结 8 1599
[愿得一人]
[愿得一人] 2020-12-25 12:11

I\'m using Reactjs and using API through AJAX in javascript. How can we resolve this issue? Previously I used CORS tools, but now I need to enable CORS.

8条回答
  •  -上瘾入骨i
    2020-12-25 12:31

    You need to activate CORS in server Side!

    if you can not change the server (for example if you use external API), create a proxy server. Please check this post for more details.

提交回复
热议问题