diff --git a/lib/engine.js b/lib/engine.js index 0599222..a697d6e 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -20,10 +20,10 @@ function middie (complete) { let regexp if (url) { - regexp = pathToRegexp(sanitizePrefixUrl(url), [], { - end: false, - strict: false + const pathRegExp = pathToRegexp(sanitizePrefixUrl(url), { + end: false }) + regexp = pathRegExp.regexp } if (Array.isArray(f)) { diff --git a/package.json b/package.json index 922ec15..8a4bfb4 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@fastify/error": "^4.0.0", "fastify-plugin": "^5.0.0", - "path-to-regexp": "^6.2.2", + "path-to-regexp": "^8.1.0", "reusify": "^1.0.4" }, "publishConfig": {