diff --git a/lib/engine.js b/lib/engine.js index a697d6e..0cf4c91 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -20,10 +20,10 @@ function middie (complete) { let regexp if (url) { - const pathRegExp = pathToRegexp(sanitizePrefixUrl(url), { - end: false + regexp = pathToRegexp(sanitizePrefixUrl(url), [], { + end: false, + strict: true }) - regexp = pathRegExp.regexp } if (Array.isArray(f)) { diff --git a/package.json b/package.json index 289a6da..00d54ae 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@fastify/error": "^3.2.0", "fastify-plugin": "^4.0.0", - "path-to-regexp": "^8.1.0", + "path-to-regexp": "^6.3.0", "reusify": "^1.0.4" }, "publishConfig": {