Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

über-simple node.js-Proxy to enable CORS request for any website.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README
Octocat-spinner-32 server.js
README
REQUIREMENTS

* node.js in order to start the proxy locally
* some entries in your hosts file, like
  127.0.0.1 proxy.example.com           # proxy for example.com
  127.0.0.1 subdomain.proxy.example.com # proxy for subdomain.example.com
  
  
USAGE

1. Start the proxy
   $ node server.js
2. If you want to send CORS requests to »example.com/foo/bar.json«, use »proxy.example.com:8080/foo/bar.json«
3. That's it


CUSTOM HEADERS & HOST

In case you need to be able to send custome headers, pass them as SPACE-separated argument list:
$ node server.js X-FunkyappApiKey X-SecretStuff

If you need to specify a custom Domain, just add id as another argument, like:
$ node server.js X-FunkyappApiKey X-SecretStuff custom.domain.com

CORS?

* http://www.w3.org/TR/cors/
* http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
Something went wrong with that request. Please try again.