From e16b870ed3b712d2e0fe397b6fbe87101d6addbb Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Mon, 11 Nov 2019 20:32:15 -0500 Subject: [PATCH] use original url in cache key --- src/middlewares/openapi.request.validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewares/openapi.request.validator.ts b/src/middlewares/openapi.request.validator.ts index 376ecf5e..69b40a6a 100644 --- a/src/middlewares/openapi.request.validator.ts +++ b/src/middlewares/openapi.request.validator.ts @@ -50,7 +50,7 @@ export class RequestValidator { // cache middleware by combining method, path, and contentType // TODO contentType could have value not_provided const contentType = extractContentType(req) || 'not_provided'; - const key = `${req.method}-${req.path}-${contentType}`; + const key = `${req.method}-${req.originalUrl}-${contentType}`; if (!this._middlewareCache[key]) { this._middlewareCache[key] = this.buildMiddleware(