cors-proxy

a proxy that does cors

A proxy that does CORS

npm install -g cors-proxy
cors-proxy

Use it with a function like

function proxy(url) {
    return 'http://localhost:3001/?url=' + encodeURIComponent(url);
}

And you can make CORS requests to localhost:3001 from localhost on other ports.