CORS error when jquery ajax request on api

后端 未结 2 628
予麋鹿
予麋鹿 2021-01-13 20:17

I am using jQuery ajax to send request to some API. Due to the CORS policy I got a CORS error on the browser\'s console

Here\'s by code



        
2条回答
  •  无人及你
    2021-01-13 20:54

    The cors error is cross origin request policy maintained by the browser for security. To solve your problem either you will have to allow cors request in your server coding or if you do not have access to the server api code you will have to make the api call from your server to api server

提交回复
热议问题