Any help on how can I resolve this issue?
Found it! The solution is to run the NodeJS server alongside Apache on the same port.
Here is the final solution to run apache website on port 80, node js service on port 8080 and use .htaccess RewriteRule from above blog post, modified to run WeInRe module through nodejs.
In the DocumentRoot of the apache website, add the following:
This will route all the WeInRe calls to the port 8080 at the server, but will not affect the client, and so no cross-domain errors.
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.