2.0.0 • Published 8 years ago
doubles v2.0.0
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.