Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/debitoor/httpsonly
Express middleware that redirects all http requests to https
https://github.com/debitoor/httpsonly
Last synced: 12 days ago
JSON representation
Express middleware that redirects all http requests to https
- Host: GitHub
- URL: https://github.com/debitoor/httpsonly
- Owner: debitoor
- Created: 2016-06-06T09:08:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-01-27T16:09:37.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T04:50:26.304Z (19 days ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# httpsonly
[![https://img.shields.io/npm/v/httpsonly](https://img.shields.io/npm/v/httpsonly)](https://www.npmjs.com/package/httpsonly)
[![Node.js CI](https://github.com/debitoor/httpsonly/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/debitoor/httpsonly/actions/workflows/node.js.yml)Express middleware that redirects http requests to https.
Also sets Strict Transport Security header, telling browsers to visit by HTTPS for the next year.
Also hides the powered by express header.```shell
npm install httpsonly
```## Usage
```javascript
var httpsonly = require('httpsonly');
app.use(httpsonly()); //app is the express app
```## License
[MIT](http://opensource.org/licenses/MIT)