Access-Control-Allow-Origin is a response header not a request header.
It has to be sent by the server you are making the request to.
CORS would be useless if the site hosting the JavaScript could grant itself permission to access any site on the WWW.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more