hapi plugin that adds http to https redirection
By default, any incoming request with
X-Forwarded-Proto will be redirected (301) to the same host and path with
'https' as the protocol. You can optionally disable proxy mode and redirect based on the actual request protocol.
Just load the plugin and go!
plugin.register(server, [options], next)
Registers the plugin to run
onRequest in the request lifecycle.
Indicates whether the server expects requests coming from a reverse proxy (a common Node web server setup) or directly from the Internet. Set this to
false if you'd like to redirect based on the actual protocol instead of the
MIT © Ben Drucker