Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanburnette/express-force-https

Express or Node.js HTTP middleware for forcing all connections to HTTPS using a header redirect.
https://github.com/ryanburnette/express-force-https

Last synced: 17 days ago
JSON representation

Express or Node.js HTTP middleware for forcing all connections to HTTPS using a header redirect.

Awesome Lists containing this project

README

        

# [express-force-https](https://github.com/ryanburnette/express-force-https)

[![repo](https://img.shields.io/badge/repository-Github-black.svg?style=flat-square)](https://github.com/ryanburnette/express-force-https)
[![npm](https://img.shields.io/badge/package-NPM-green.svg?style=flat-square)](https://www.npmjs.com/package/@ryanburnette/express-force-https)

Express.js middleware to force HTTPS. It works behind a proxy, and on Heroku.

```js
if (process.env.NODE_ENV == 'production') {
app.use(require('@ryanburnette/express-force-https'));
}
```