https://github.com/includable/express-middleware-https
HTTPS redirect middleware.
https://github.com/includable/express-middleware-https
Last synced: 3 months ago
JSON representation
HTTPS redirect middleware.
- Host: GitHub
- URL: https://github.com/includable/express-middleware-https
- Owner: includable
- Created: 2019-02-06T11:33:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T11:37:39.000Z (about 7 years ago)
- Last Synced: 2025-03-15T23:37:28.949Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# middleware-https
Simple force HTTPS redirect middleware, meant for use behind a proxy (e.g. Heroku).
## Installation
```sh
npm i @includable/middleware-https
```
## Usage
```js
const express = require('express')
const https = require('@includable/middleware-https')
app.use(https('example.com')) // leave out parameter to apply to all domains
app.listen(process.env.PORT || 3000, () => console.log(`Example app running.`))
```