HTML5 Canvas, XMLHttpRequest blocked by CORS policy
Hello,
I'm tearing my hair out, searching for hours... I have a CORS question regarding subdomains of the same domain that I control. I've got my HTML5 Canvas application in test.MyDomain.com . It reads manufacturer_list.xml, which is located in images.MyDomain.com. When I run my application on the web, I get this error:
Access to XMLHttpRequest at 'http://images.MyDomain.com/manufacturer_list.xml?random=70458&' from origin 'http://test.MyDomain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've read information on this site, and many forums, etc. I cannot figure out what needs to be put in my Javascript to allow one subdomain to access files from another subdomain. I've also tried putting in document.domain="MyDomain.com"; but that had no effect. I don't understand why there is a CORS conflict, when I control all content on the domain.
Should code be put in the Javascript file? If so, what do I write? Or, is it a server setting that needs to be changed? I am totally lost -- any help is greatly appreciated!
