You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

http-forward

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-forward

Simple proxy forward for incoming HTTP request

0.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

http-forward Build Status NPM

Simple proxy forward for incoming HTTP requets. Built for node.js/io.js.

Installation

npm install http-forward

API

const http = require('http')
const forward = require('http-forward')

var server = http.createServer(function (req, res) {
  // Define proxy config params
  req.forward = { target: 'http://new.server.net' }
  forward(req, res)
})

server.listen(3000)

forward(req, res, callback)

  • req http.IncomingMessage - Required
  • res http.OutgoingMessage - Required
  • callback function(err, res) - Optional callback

License

MIT - Tomas Aparicio

Keywords

forward

FAQs

Package last updated on 25 Aug 2015

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