1.0.5 • Published 2 years ago

@donutteam/koa-force-ssl v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago