Skip to content
 
 

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages