JSPM

@flashfix/express-trailingslash

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q10327F
  • License MIT

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

Package Exports

  • @flashfix/express-trailingslash
  • @flashfix/express-trailingslash/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@flashfix/express-trailingslash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@flashfix/express-trailingslash

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

Usage:

app.use(require('@flashfix/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 }));