Http.get function. No 'Access-Control-Allow-Origin' header

Hi, i have a nginx server running on localhst with some php scripts running on it. And i try to send a get request to that server from playcanvas. I use http.get function:

pc.http.get("http://localhost/index/getTest", function (err, data) {
          if (!err) {

I run my playcanvas app without https, cuz it will genereate some error about https.
But I keep getting error:
XMLHttpRequest cannot load No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access

Can you help me with get reuqests?


Just enable CORS headers.