Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

predirect

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

predirect

Simple http redirect method

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
13
Maintainers
1
Weekly downloads
 
Created
Source

predirect

Simple http redirect method

Build Status

Usage

var redirect = require('predirect');
var http = require('http');

http.createServer(function (req, res) {
  redirect(req, res, 'https://github.com');
}).listen(3333);

API

redirect(req, res, url[, text])

Redirect to url and respond with text if the request method isn't HEAD.

text gets parsed by util.format and defaults to -> %s.

Installation

With npm do

$ npm install predirect

License

(MIT)

Keywords

http,

FAQs

Package last updated on 18 Mar 2013

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