@entva/express-trailingslash
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

@entva/express-trailingslash

ExpressJS middleware that redirects requests with trailing slashes to a clean one without it

Usage:

app.use(require('@entva/express-trailingslash')());

When used together with serve-static, pass redirect: false option to it to avoid conflicts:

app.use(require('serve-static')(`${__dirname}/public`, { redirect: false }));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.0
    72
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.3.0
    72
  • 1.2.0
    1
  • 1.1.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i @entva/express-trailingslash

Weekly Downloads

75

Version

1.3.0

License

MIT

Unpacked Size

4.22 kB

Total Files

7

Last publish

Collaborators

  • suprmax