0

I have enabled CORS in Apache, here are the headings I am seeing when loading the site:

HTTP/1.1 200 OK Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Allow-Origin: * Cache-Control: no-cache, must-revalidate, max-age=0, max-age=0, no-cache Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 Date: Wed, 20 Aug 2014 17:05:00 GMT Expires: Wed, 11 Jan 1984 05:00:00 GMT Link: <http://test.example.com/?p=7>; rel=shortlink Pragma: no-cache Server: Apache Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN X-Mod-Pagespeed: 1.7.30.4- X-Pingback: http://test.example.com/xmlrpc.php X-Powered-By: PHP/5.4.28 Content-Length: 6757 Connection: keep-alive 

However when I reload the page, I get the following JS Error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.example.com/?x=1. This can be fixed by moving the resource to the same domain or enabling CORS. 

Any ideas why this would be failing? I am trying to access api.example.com from test.example.com

1
  • any updates on this? Commented Nov 24, 2014 at 12:12

1 Answer 1

0

I had to add the configuration to the servers I was requesting data from.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.