Socket
Socket
Sign inDemoInstall

http-forward

Package Overview
Dependencies
4
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-forward

Simple proxy forward for incoming HTTP request


Version published
Weekly downloads
118
increased by13.46%
Maintainers
1
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 25 Aug 2015

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc