Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

express-redirect-to-https

0.3.0 • Public • Published

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
}));

Install

npm i express-redirect-to-https

DownloadsWeekly Downloads

14

Version

0.3.0

License

MIT

Unpacked Size

4.88 kB

Total Files

5

Last publish

Collaborators

  • avatar