jutaz / https-rewrite

🌐 Rewrite http links to https

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

🌐 Rewrite http links to https


Languages

Language:JavaScript 100.0%