nlf / doubles

hapi plugin to redirect removing www. prefix from hostnames

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doubles

A hapi plugin to redirect incoming requests removing the www. prefix from hostnames.

example

server.register([
  require('doubles')
], {
  routes: {
    vhost: 'example.com'
  }
}, (err) => {

  server.start();
});

Any requests to the above server with a Host header matching www.example.com will be redirected to example.com, all other requests will be passed through unmodified.

About

hapi plugin to redirect removing www. prefix from hostnames


Languages

Language:JavaScript 100.0%