Skip to content

Commit

Permalink
use original url in cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Nov 12, 2019
1 parent 235c4db commit e16b870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/openapi.request.validator.ts
Expand Up @@ -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(
Expand Down

0 comments on commit e16b870

Please sign in to comment.