# ssl-express-www

> Redirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.

Latest version **3.2.1** (published 2023-01-05) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.2.1 |
| Published | 2023-01-05 |
| First published | 2018-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Bruno Macedo |
| Maintainers | brunomacedo |
| Keywords | ssl, https, express, nodejs, node, force ssl, force https, enforce https, domain redirect, remove www, middleware redirect, slash redirect, trailing slash, remove trailing, heroku redirect, heroku ssl, production ssl redirect |

## Links

- npm: https://www.npmjs.com/package/ssl-express-www
- Repository: https://github.com/brunomacedo/ssl-express-www
- Homepage: https://github.com/brunomacedo/ssl-express-www#readme
- Issues: https://github.com/brunomacedo/ssl-express-www/issues
- npm.io page: https://npm.io/package/ssl-express-www

## Dependencies (1)

- [express](https://npm.io/package/express.md) ^4.16.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 3.2.1 (latest) — 2023-01-05
- 3.0.10 — 2022-08-01
- 3.0.9 — 2022-08-01
- 3.0.8 — 2021-06-01
- 3.0.7 — 2020-04-30
- 3.0.6 — 2019-11-19
- 3.0.5 — 2019-08-28
- 3.0.4 — 2019-08-28
- 3.0.3 — 2018-10-01
- 3.0.2 — 2018-07-06
- 3.0.1 — 2018-07-06
- 3.0.0 — 2018-06-15
- 2.0.0 — 2018-04-29
- 1.3.0 — 2018-04-25
- 1.1.0 — 2018-04-02
- … 20 more at https://npm.io/package/ssl-express-www/versions

## README

# Force SSL using Express (Redirect HTTP to HTTPS)

Redirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.

[![project-version](https://img.shields.io/npm/v/ssl-express-www.svg?style=flat-square)](https://github.com/brunomacedo/ssl-express-www) [![downloads](https://img.shields.io/npm/dm/ssl-express-www.svg?style=flat-square)](https://www.npmjs.com/package/ssl-express-www) [![npm](https://img.shields.io/badge/npm-v5.5.1-red.svg?style=flat-square)](https://www.npmjs.com) [![mocha](https://img.shields.io/badge/mocha-v4.1.0-yellowgreen.svg?style=flat-square)](https://mochajs.org/) [![Build Status](https://travis-ci.org/brunomacedo/ssl-express-www.svg?branch=master)](https://travis-ci.org/brunomacedo/ssl-express-www)

## Installation

```bash
npm install ssl-express-www
```

## Usage CommonJS

```javascript
var express = require('express');
var secure = require('ssl-express-www');
var app = express();

app.use(secure);

var port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));

```

## Usage ES6

Transpile it with [Babel](https://babeljs.io/)

```javascript
import express from 'express';
import secure from 'ssl-express-www';

const app = express();

app.use(secure);

let port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));

```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

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