2.0.0 • Published 7 years ago

koa-lowercase-url v2.0.0

Weekly downloads
5
License
CC0-1.0
Repository
github
Last release
7 years ago

Koa middleware that redirects all requests to an URL with uppercase letters to the same URL in lowercase, ignoring the query string (key and value).

Installation

npm install koa-lowercase-url

Usage

const app = new (require('koa'));
app.use(reuire('koa-to-lowercase')());
app.use(async (ctx, next) => {
   this.response.body = 'If this URL had uppercase letters before the ? now they are in lowercase.';
});
app.listen(8000);

License

CC0

Related middleware

koa-no-trailing-slash

2.0.0

7 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago