Simple reliable cors proxy
npm install adhoc-cors-proxyAd-hoc cors proxy
=================

Simple reliable node-based cors proxy.
``bash`
$ corsproxy www.target.com -p 8080
proxy to http://www.target.com started on port 8080
Why simple reliable? Because it just assembles two well tested and actively maintained middlewares: http-proxy and cors. It's a package you could have written yourself, but this one's ready to use with complete usage instructions (thanks to docopt).
local testing
`bash`
$ npm install adhoc-cors-proxy
global install
`bash`
$ npm install -g adhoc-cors-proxy
with local install
`bash`
node bin
node bin -h | --help | --version
with global install
`bash`
corsproxy
corsproxy -h | --help | --version
### Options
`bash`
-p
--host=
-o
-c, --credentials access-control-allow-credentials=true
Alternatively, the proxy can be configured entirely using environment variables. Check the sources for a better understanding of configuration priority.
## Production
I recommend using Heroku's free tier or pm2 on a virtual-machine cloud-service.
You can hack into this package by installing grunt
`bash`
$ npm install -g grunt-cli
Starting the server and specifying the target has a slightly different syntax:
`bash``
$ grunt --target=http://www.target.com -p 8080
Jshint will check your code and the proxy will restart everytime the sources are modified.