1.0.1 • Published 6 years ago

https-rewrite v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

https-rewrite

Rewrite URLs to https.

NPM JavaScript Style Guide

Install

npm install --save https-rewrite

Usage

Currently only express@^4.0.0 is supported as the engine to perform rewrites in.

express

const redirectToHttps = require('https-rewrite/express');

// ... set up express

// Should be one of the topmost (if not the) middlewares.
app.use(redirectToHttps({
  // Change the status code used to redirect. Defaults to 307.
  status: 301
}))

License

MIT © jutaz