2.0.2 • Published 5 years ago

middleware-sanitizeurl v2.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

middleware-sanitizeurl

ExpressJS middleware that checks request URL for potentially breaking things, such as:

  • Unparsable query string sequences that would crash on attempt to parse on the client side
  • Double question mark in URL
  • Multiple slashes

After one of the above checks fails the middleware attempts to guess a safe variant of the url and redirect there.

Options:

  • redirectTo (string): When url contains breaking character sequences and is impossible to parse, redirect to this URL, default: '/'

Usage:

app.use(require('middleware-sanitizeurl')());
2.0.2

5 years ago

2.0.1

5 years ago

1.2.0

5 years ago

2.0.0

5 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.1

7 years ago