Skip to content

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

Notifications You must be signed in to change notification settings

daleharvey/CORS-Proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

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/

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%