Skip to content

klokoy/hapi-require-https

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapi-require-https Build Status

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.

How to use it ?

To use this plugin you need to register it after you have created your server.

//other imports
const redirect = require('hapi-require-https');

//create your server

//register the plugin to redirect all http trafic to https
server.register(redirect, function (error) {
  console.log(error);
})

About

hapi http -> https redirection for servers behind a reverse proxy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%