WebPagetest Forums
How do I enable Cross-Origin (ability to call api from diffrent server) - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: How do I enable Cross-Origin (ability to call api from diffrent server) (/showthread.php?tid=13584)



How do I enable Cross-Origin (ability to call api from diffrent server) - Richard - 03-05-2015 10:39 PM

Hello everyone.

I got my webpagetest enviroment up and running. I now just need to be able to call the API from my main server. The tests are running on sepperate machines, even the api/webpagetest are.

www->webpagetestserver->agent

so my www webserver which ofcourse is a diffrent domain name and all needs to be able todo Cross-Origin calls.
I am very familiar with the LAMP stack where its easy to add Cross-Origin into the header of all calls, making this feature possible.

But NodeJS is new to me so I have not been able to figure out howto enable Cross-Origin for the webpagetest.js yet.

How do I enable that?

If possible, then I like to enable Cross-Origin for all nodejs related stuff. Since the only things going on on this server is the webpagetest.

Thanks.
Richard A