New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

node-force-secure-redirect

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-force-secure-redirect

Force all incoming HTTP connections to be redirected to secure (HTTPS) version of your express app

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

Build Status

node-force-secure-redirect

Force all incoming HTTP connections to be redirected to secure (HTTPS) version of your express app.

Works for node apps directly behind an Amazon ELB (Elastic Load Balancer).

Install

npm install node-force-secure-redirect --save

Usage

var forceHTTPS = require('node-force-secure-redirect');  
...  
...
...
app.set('trust proxy'); // this is important when your app is behind an ELB
app.use(forceHTTPS('environment'));  

where the environment parameter (string or array of strings) are the environment for which you want to enforce SSL on. If no environment string is passed in, HTTPS will not be enforced on any environment.

Tests

NODE_ENV=testing npm test

License

Licensed under GPL v3

Credits

Made with love in Dhaka, Bangladesh by Riyadh Al Nur

Keywords

node

FAQs

Package last updated on 09 Nov 2015

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