🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

koa-no-trailing-slash

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-no-trailing-slash

Koa middleware that redirects all requests to an URL with a trailing slash to the same URL without it.

2.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

ComVer

Koa middleware that redirects all requests to an URL with a trailing slash to the same URL without it, ignoring the query string (key and value).

Installation

npm install koa-no-trailing-slash

Usage

const app = new (require('koa'));
app.use(require('koa-no-trailing-slash')());
app.use(async (ctx, next) => {
   ctx.response.body = 'Did this URL had a trailing slash?';
});
app.listen(8000);

License

CC0

koa-lowercase-url

Keywords

koa

FAQs

Package last updated on 09 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts