express-secure-only
Ensure your express connections only run over HTTPS.
Last updated 6 years ago by izaakschroeder .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install express-secure-only 
SYNC missed versions from official npm registry.

express-secure-only

Express middleware to ensure you're running over HTTPS.

build status coverage license version downloads

Features:

  • Redirect requests to their HTTPS equivalents
var express = require('express'),
	secure = require('express-secure-only'),
	app = express();

app.use(secure());
app.get('/', function(req, res) {
	res.status(200).send('Hello world.');
});
app.listen();

Usage with a custom host or port:


app.use(secure({
    host: 'localhost:3001'
}));

Current Tags

  • 0.2.1                                ...           latest (6 years ago)

4 Versions

  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago

Copyright 2014 - 2017 © taobao.org |