3 ms·
>The fact that a website can’t make a request to another website unless that domain like it That's wrong. Any website can make a request to any other website.
by Thorrez 2y ago
>The fact that a website can’t make a request to another website unless that domain like it
That's wrong. Any website can make a request to any other website. The same origin policy will prevent READING the response, not making the request. This is to prevent evil.com from making a request to email.com and reading all your emails.
CORS was invented as a way to partially disable the same origin policy for websites that want to allow their responses to be read by other sites. Note that CORS is a way to disable blocking. Most people think CORS blocks things, but that's a misconception. The same origin policy blocks things, and CORS can partially disable it. CORS = Cross Origin Resource Sharing. The Sharing refers to how it disables blocking.
(This is a slight simplification, because I'm ignoring complex CORS.)