express-resolve-path
Recommended Node.js version
: >= 8.9.0 (LTS)
Express middleware that rewrites paths with multiple slashes to the correct path.
For example, when a request comes in the path of multiple slashes, it is rewritten to the converted path as shown below to match the routing rule.
Request path
: ///foo///bar//?val=hello
Rewrite path
: /foo/bar?val=hello
Install
$ npm install express-resolve-path
API
const resolvePath = ; const app = ; app; app;
resolvePath([options])
Options
methods
Specifies the requested method to apply. (not case-sensitive)
// methods <string> specifying a single methodapp; // methods <string> specify multiple methodsapp; // methods <array>app;