New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-elb-redirect-http-middleware

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-elb-redirect-http-middleware

Redirects all HTTP traffic from an AWS Elastic Load Balancer to HTTPS without resorting to nginx or apache

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aws-elb-redirect-http-middleware

Redirects all HTTP traffic from an AWS Elastic Load Balancer to HTTPS without resorting to nginx or apache


Purpose:

  • If you're using node/express servers in production that sit behind an AWS ELB, Redirecting all HTTP traffic to HTTPS can be a little tricky because of the following:

    User request (https://<your-domain>) -> AWS ELB (http://<one-of-your-servers>) -> One of your servers
    
  • This problem occurs because your SSL cert is attached to your load balancer, but your load balancer forwards requests to your servers using http.

Example Usage:

const express = require("express");
const server = express();
const redirectHTTPMiddleware = require("aws-elb-redirect-http-middleware");
const environment = process.ENV.SERVER_ENV || "development";

if (environment === "production") server.use(redirectHTTPMiddleware);

Keywords

FAQs

Package last updated on 17 Feb 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

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