I have a simple AJAX request that calls http://myexamplefeed.com/feed/23213
I just moved this site to a new server, and all of a sudden I'm getting this error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myexamplefeed.com/feed/23213. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘(null)’).
The thing is, in my .htaccess file I've tried to match *:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin: *
</IfModule>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin: "http://myexamplefeed.com"
</IfModule>
and I still get the CORS header ‘Access-Control-Allow-Origin’ does not match ‘(null)’
error.
Isn't null referring to the Header set Access-Control-Allow-Origin
value, and shouldn't I be able to alter it in my .htaccess file?
UPDATE: That was in Firefox. In Chrome I'm getting this message:
The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed
Try with:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>