WebPagetest Forums
Access Control Allow Origin Header - where & how? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Access Control Allow Origin Header - where & how? (/showthread.php?tid=13271)



Access Control Allow Origin Header - where & how? - Enduring Epilepsy - 10-02-2014 12:37 PM

After a lot of hard work, I have my site running pretty well. However an error keeps showing up in the console of my developer tools.

XMLHttpRequest cannot load http://..... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.enduringepilepsy.com' is therefore not allowed access.

The address that cannot access it always css from Google PageSpeed.(I removed it above because its long and jumbled) PageSpeed seems to be working fine but I keep having this show up and want to find out how to fix it.

The research I did lead me to these sites:

CORS - Access Control
W3 - CORS

but I'm not sure where and how to add the code. Huh What I have tried resulted in 500 errors and the white screen of death. Exclamation So I'm looking for some insight. Anyone who could help, I'd appreciate it.

Thanks.


RE: Access Control Allow Origin Header - where & how? - pmeenan - 10-03-2014 01:49 AM

Is it on a specific page (somewhere I can reproduce it)? There is some javascript somewhere on the page making a fetch for the Google PageSpeed URL and it isn't allowed because it's on a different domain.

I'd recommend sending a note to the PageSpeed team with the details because it sounds like a bug in a rewriter somewhere (or an unexpected interaction).