MCPcopy Index your code
hub / github.com/restify/node-restify / sanitizePath

Function sanitizePath

lib/plugins/pre/prePath.js:45–52  ·  view source on GitHub ↗

* Cleans up sloppy URLs on the request object, * like `/foo////bar///` to `/foo/bar`. * * @public * @function sanitizePath * @returns {Function} Handler

()

Source from the content-addressed store, hash-verified

43 * @returns {Function} Handler
44 */
45function sanitizePath() {
46 function _sanitizePath(req, res, next) {
47 req.url = strip(req.url);
48 next();
49 }
50
51 return _sanitizePath;
52}
53
54///--- Exports
55

Callers 1

plugins.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected