From what I've always understood, your browser decided whether or not to allow Cross Origin Requests.
The way I understand it is as follows:
Your browser requests a certain website from a server, say
www.billswebsite.com
. The server sends back a page. If the page tries to make your browser request data from somewhere else, something malicious might be going on so your browser decides for you not to make requests to anywhere but the website you initially entered.
However, then I came across this website http://jsonplaceholder.typicode.com/
which claims that on their end, they have turned off restrictions on CORS
.
I don't get how they did that. Why would the responsibility in such a thing lie in the hands of the provider? Any malicious website could just allow CORS
and steal your data, or at least point your computer to places you don't want to go.
Can someone please clarify how this whole thing works?