News for hackers. Stuff that matters.
Re:Claude's API now supports CORS requests, enabling client-... by Thorrez on Friday August 23, 2024 @09:50AM (#41329005)
>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.)

There are no comments on this comment yet.