express-redirect-to-https
v0.4.0
Published
Express middleware for redirecting "http" requests to "https" url path
Downloads
645
Maintainers
Readme
express-redirect-to-https
Express middleware for redirecting http
requests to https
url path.
Usage
var express = require('express');
var redirectToHttps = require('express-redirect-to-https');
var app = express();
app.use(redirectToHttps());
// OR
app.use(redirectToHttps({
httpPort: 3000,
httpsPort: 4000
}));
// OR
app.use(redirectToHttps({
httpPort: 3000,
httpsPort: 4000,
redirectStatus: 307 // Default redirect status is 301
}));