This repository was archived by the owner on Mar 27, 2019. It is now read-only.
tssm/koa-no-trailing-slash Repository files navigationKoa 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).
npm install koa-no-trailing-slash
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);About
Middleware that redirects all requests to an URL with a trailing slash to the same URL without it
Topics Resources Stars Watchers ForksYou can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4