Socket
Book a DemoInstallSign in
Socket

adhoc-cors-proxy

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adhoc-cors-proxy

Simple reliable cors proxy

0.2.6
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Ad-hoc cors proxy

Dependency Status

Simple reliable node-based cors proxy.

$ 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).

Installation

local testing

$ npm install adhoc-cors-proxy

global install

$ npm install -g adhoc-cors-proxy

Usage

with local install

node bin <target> [--port=<port>] [--origin=<origin>] [--credentials]
node bin -h | --help | --version

with global install

corsproxy <target> [--port=<port>] [--origin=<origin>] [--credentials]
corsproxy -h | --help | --version

### Options

-p <port>, --port=<port>        Port number. [default: 9292]
--host=<host>                   Host
-o <origin>, --origin=<origin>  Restrict origin domain
-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.

Development

You can hack into this package by installing grunt

$ npm install -g grunt-cli

Starting the server and specifying the target has a slightly different syntax:

$ grunt --target=http://www.target.com -p 8080

Jshint will check your code and the proxy will restart everytime the sources are modified.

License

MIT

Keywords

cors

FAQs

Package last updated on 06 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.