-1

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 "*"

Phil
  • 157,677
  • 23
  • 242
  • 245
  • 2
    `Access-Control-Allow-Origin` needs to be present in the response headers of the remote server. Looking at your URLs though, is the only difference that one has a `www.` prefix? If they're the same host, use a path instead of a full URI to make AJAX requests – Phil Apr 03 '19 at 03:35

1 Answers1

0

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.

Emma
  • 27,428
  • 11
  • 44
  • 69