This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@donutteam/koa-force-ssl

1.0.5 • Public • Published

Koa Force SSL

A class for creating Koa middlewares that redirect requests to their HTTPS counterparts.

Note: Requests from a local IP address are not redirected. This is acheived by using the is-local-ip package.

Installation

Install the package with NPM:

npm install @donutteam/koa-force-ssl

Usage

To use this class, simply instantiate an instance and add it to your Koa stack:

import Koa from "koa";

import { ForceSSLMiddleware } from "@donutteam/koa-force-ssl";

const app = new Koa();

const forceSSLMiddleware = new ForceSSLMiddleware();

// Be sure to add the execute function on the instance
// and NOT the instance itself
app.use(forceSSLMiddleware.execute);

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @donutteam/koa-force-ssl

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

3.46 kB

Total Files

5

Last publish

Collaborators

  • duckdotexe