Awesome Open Source
Awesome Open Source

hapi-require-https tests

hapi plugin that adds http to https redirection

By default, any incoming request with 'http' in 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 register the plugin and go!

  plugin: require('hapi-require-https'),
  options: {}


plugin.register(server, [options])

Registers the plugin to run onRequest in the request lifecycle.


Type: object
Default: {}


Type: boolean
Default: true

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 X-Forwarded-Proto header.


MIT © Ben Drucker

Alternatives To Hapi Require Https
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,160,038
Proxy (24,707
Https (5,516
Hapi (1,798
Reverse Proxy (1,629