Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-force-https-schema

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-force-https-schema

configurable express middleware that forces https schema based on x-forwarded-proto header

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

express-force-https-schema

Installation

$ npm install express-force-https-schema

Description

Very simple configurable express middleware that forces https schema based on x-forwarded-proto header.

The x-forwarded-proto is used by Heroku, AWS ELB and others to tell which schema the request was made with.

Usage

import forceHttpsSchema from "express-force-https-schema";

const app = express();

app.use(
  forceHttpsSchema({
    enabled: process.env.FORCE_HTTPS === "true",
    skipUserAgents: /ELB-HealthChecker/i
  })
);

Options

KeyDefault
enabledtrue
userAgentHeaderuser-agent
schemaHeaderx-forwarded-proto
skipUserAgentsnull

Test

npm test

Keywords

FAQs

Package last updated on 04 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc