a proxy that does cors
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
cors-proxy.js
package.json

README.md

Replaced by gkucmierz/cors-proxy in new versions: this npm package is now maintained by gkucmierz and has a different interface in new versions.

cors-proxy

A proxy that does CORS

npm install -g cors-proxy
cors-proxy

Use it with a function like

function proxy(url, headers, auth) {
    return 'http://localhost:3001/' +
        '?url=' + encodeURIComponent(url) +
        (headers ? ('&headers=' + encodeURIComponent(JSON.stringify(headers))) : '') +
        (auth ? ('&auth=' + encodeURIComponent(JSON.stringify(auth))) : '');
}

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