gclb-express-middleware

1.0.2 • Public • Published

gclb-express-middleware

For node applications behind a Google Cloud Load Balancer. Sometimes you want them to be aware of the GCLB in-front.

API

redirectToHttps

Redirect (301 status code) any non-HTTPS requests to the HTTPS equivalent.

var gclb = require('gclb-express-middleware');
express.use(gclb.redirectToHttps())

blockNonHttps

Block any non-HTTPS requests by just returning a 404 HTTP status.

var gclb = require('gclb-express-middleware');
express.use(gclb.blockNonHttps())

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i gclb-express-middleware

Weekly Downloads

2

Version

1.0.2

License

ISC

Last publish

Collaborators

  • ahume