https-rewrite

1.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i https-rewrite

      Weekly Downloads

      0

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      1.65 kB

      Total Files

      4

      Last publish

      Collaborators

      • jutaz