ERROR : Cross-Origin
Request Blocked: The Same Origin Policy disallows reading the remote
resource at
https://www.SOMEURL (Reason: CORS header 'Access-Control-Allow-Origin' missing).
.
When the code send the request, you shall have a "200 OK" response code in your browser console, which means that the resource is accessed, but it does not grant the right to share that resource. It does this by not allowing "Access-Control-Allow-Origin".
To change that, you have to write this in the .htaccess of the requested domain file (notyourdomain.com):
Add following code to your .HTACCESS file
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
No comments:
Post a Comment