Caution
This repository is archived and no longer actively maintained.
We are no longer accepting issues, feature requests, or pull requests. For additional support or questions, please visit the Express.js Discussions page.
Tiny server that redirects HTTP requests to SSL. These is currently really rough and you probably shouldn't use it.
var server = require('ssl-redirect')(options)
An http.Server
is returned and automatically starts.
Options are:
port
- the port to listen to. Should be different than your actual SSL app.host: localhost
- host to redirect tomaxAge: 16070400
- max age forStrict-Transport-Security
includeSubDomains: true
- forStrict-Transport-Security