Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
über-simple node.js-Proxy to enable CORS request for any website.
JavaScript
branch: master

This branch is 1 commit ahead, 63 commits behind gr2m:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
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.