Skip to content

About

A simple express.js middleware that redirects incoming unencrypted HTTP requests to HTTPS.

Resources

Stars

11 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

expressjs-force-https

A simple express.js middleware that redirects incoming unencrypted HTTP requests to HTTPS.

Installation

npm install expressjs-force-https

Usage

const express = require("express");
const forceHTTPS = require("expressjs-force-https").forceHTTPS;
const app = express();

//Redirecting incoming unencrypted http requests
app.use(forceHTTPS);

app.listen(3000, () => {
    console.log(`Server Running...`);
});

To force HTTPS on a Node App Service on Azure:

const forceAzureHTTPS = require("expressjs-force-https").forceAzureHTTPS;

app.use(forceAzureHTTPS);

About

A simple express.js middleware that redirects incoming unencrypted HTTP requests to HTTPS.

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages