What is the issue CORS is trying to solve?

后端 未结 3 723
半阙折子戏
半阙折子戏 2020-11-30 11:06

I\'ve been reading up on CORS and how it works, but I\'m finding a lot of things confusing. For example, there are lots of details about things like

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-30 11:32

    There are security and privacy reasons for not allowing requests from anywhere. If you visited my website, you wouldn't want my code to make requests to Facebook, reddit, your bank, eBay, etc. from your browser using your cookies, right? My site would then be able to make posts, read information, place orders, etc. on your behalf. Or on my behalf with your accounts.

提交回复
热议问题