Socket
Book a DemoInstallSign in
Socket

hapi-permanent-redirect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-permanent-redirect

Quickly set up permanent redirects in hapi plugin

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Hapi Permanent Redirect

Build Status Coverage Status NPM version Downloads

The purpose of this plugin is to provide a convenient way to do permanent redirects.

Registering the Plugin

var Hapi = require('hapi');

var server = new Hapi.Server();

server.register([
  {
    redirects: [{
      from: '/route1',
      to: 'route2'
    }, {
      from: '/route3',
      to: '/route4'
    }]
  }
], function (err) {
  // An error will be available here if anything goes wrong
});

Options

  • redirects Array of objects with a from and to key

Keywords

hapi

FAQs

Package last updated on 23 Mar 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