locked by CORS policy: No ‘Access-Control-Allow-Origin’ ???

Working on a simple coding job and facing this red message on dev console:

locked by CORS policy: No ‘Access-Control-Allow-Origin’

What to do?

I simply make this htaccess file to bypass CORS policy:

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>

Leave a Reply

Your email address will not be published. Required fields are marked *