connect-slashes

JSON →
library 1.4.0 ·javascript
verified May 27, 2026

Trailing slash redirect middleware for Connect and Express.js. Version 1.4.0 is the current stable release, with no predictable cadence. It automatically appends or removes trailing slashes from URLs to enforce canonical URLs. Unlike alternatives like `express-slash`, it uses 301 redirects by default and supports custom base paths and headers. It only affects GET, HEAD, and OPTIONS requests to avoid data loss on POST/PUT.

total hits 27
actors 7 distinct systems
last hit 15h ago AhrefsBot
ByteDance
9
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇬🇧 United Kingdom