http to https redirection for Hapi servers behind a reverse proxy. Any incoming request with 'http' in X-Forwarded-Proto will be redirected (301) to the same host and path with 'https' as the protocol.
Just load the plugin and go!
server.register(redirect, function (err) {
console.error(err)
})