Socket
Book a DemoInstallSign in
Socket

expressjs-force-https

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expressjs-force-https

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

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

https

FAQs

Package last updated on 30 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts