cdproxy

0.0.3 • Public • Published

Connect and Express middleware for proxying cross domain requests. Useful for avoiding JSONP and CORS support.

Installation

$ npm install cdproxy

Usage

var cdproxy = require('cdproxy');

connect()
    .use(cdproxy('myprefix')) //proxy by default.
    .use(function ( req, res ) {
        res.end("Hello from Connect!");
    })
    .listen(8000);

//GET http://localhost:8000/myprefix/http://myremote.server

cdproxy will reuse the req that receives from express/connect and override the host header only.

Running unit tests

$npm test

or simply

$mocha

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    2
  • 0.0.1
    1

Package Sidebar

Install

npm i cdproxy

Weekly Downloads

4

Version

0.0.3

License

MIT

Last publish

Collaborators

  • machadogj