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

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.


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.

Richard A