I am using loadGeoJson
to try and load data across domains. I am aware that I need to implement CORS to provide the necessary permission. The response header needs to include the following declaration:
Access-Control-Allow-Origin: *
I have modified the apache2.conf file in /etc/apache2 and added the following:
<ifModule mod_headers.c>
Header set Access-Control-Allow-Origin: *
</ifModule>
When I load my page containing the cross domain script in Firefox, everything works fine and I can see that the Access-Control-Allow-Origin has been set:
The problem arises when I load the same page in Chrome where I continue to receive the following error:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://results.ptax.ca' is therefore not allowed access.
How can the same page work perfectly in Firefox, but throw an error in Chrome? Any ideas what I might be doing wrong?