请求的资源上没有“Access-Control-Allow-Origin”标头 - CORS问题[重复]

This question already has an answer here:

enter image description here

I get this error when using forms, like likebuttons, sending comments or opening a dialogue window.

I tried to put the CORS header into my apache2 config and htaccess file.

Header set Access-Control-Allow-Origin "*"

</div>

Maybe, try this on the top of your .htaccess file, hopefully it would work:

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

If it did not, you might search on SE, there should be many similar posts about it such as this.

Finally, if you could not solve it, you might try looking for solutions on Server Fault.