This is almost certainly a cross-power issue, as mentioned above. Generally speaking, you just need to add the correct header information in the response.
Access-Control-Allow-Origin: *
In Node, I think itβs just a matter of adding it as another header in the answer using
response.writeHead
See http://nodejs.org/api/http.html#http_response_writehead_statuscode_reasonphrase_headers
Oh, and there are explicit instructions on how to do this if you are using Express. I see no reason why it cannot work using a plain old node.
http://enable-cors.org/server_expressjs.html
So, I looked at your link, in your case, I think you just need to enter the header information before using any other express application methods.
As for why it works in Firefox, and not in Chrome, Iβm not sure. Both support CORS in many versions. Perhaps you have a Chrome extension that is interfering.
source share