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

    110

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    4.88 kB

    Total Files

    5

    Last publish

    Collaborators

    • paras20xx