# express-ssl-redirect

> Redirects http users to https

Latest version **0.0.2** (published 2015-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install express-ssl-redirect
pnpm add express-ssl-redirect
yarn add express-ssl-redirect
bun add express-ssl-redirect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-03-16 |
| First published | 2015-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mike MacCana |
| Maintainers | mikemaccana |
| Keywords | ssl, tls, express |

## Links

- npm: https://www.npmjs.com/package/express-ssl-redirect
- npm.io page: https://npm.io/package/express-ssl-redirect

## Recent versions

- 0.0.2 (latest) — 2015-03-16

## README

# Express SSL Redirect

Express 4.x middleware for SSL-only sites. Redirects http requests to https.

Similar to https://www.npmjs.com/package/force-ssl except it has a simpler setup (as it makes the requires Express 'app' for non-SSL users)

## Usage:

Typically in /bin/www:

	var sslRedirect = require('express-ssl-redirect');

Then:

	sslRedirect(80, 'example.com');

Of course, you should probably run node as a non-root user, which means binding to port above 1024, and mapping incoming port 80 connections to that high numbered port and incoming port 443  connection to another high numbered port. Check out [How I deploy node apps on Linux, 2015 edition](https://medium.com/@mikemaccana/how-i-deploy-node-apps-on-linux-2014-edition-309d606219ca) for information on running express as a non-root user.

---
_Source: https://npm.io/package/express-ssl-redirect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
