cdproxy

connect and express middleware for proxying cross domain requests.

npm install cdproxy
2 downloads in the last day
9 downloads in the last week
22 downloads in the last month

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
npm loves you