From 4ebba29b418295880cb587ece51db373bec6235d Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Fri, 24 Mar 2023 23:17:19 +0100 Subject: [PATCH] use mutable kibana request --- .../src/core_versioned_route.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/http/core-http-versioned-router-server-internal/src/core_versioned_route.ts b/packages/core/http/core-http-versioned-router-server-internal/src/core_versioned_route.ts index 726c509e70f0b..33a820529cc39 100644 --- a/packages/core/http/core-http-versioned-router-server-internal/src/core_versioned_route.ts +++ b/packages/core/http/core-http-versioned-router-server-internal/src/core_versioned_route.ts @@ -112,7 +112,11 @@ export class CoreVersionedRoute implements VersionedRoute { Boolean(validation.request.body || validation.request.params || validation.request.query) ) { try { - const { body, params, query } = validate(req, validation.request, handler.options.version); + const { body, params, query } = validate( + mutableCoreKibanaRequest, + validation.request, + handler.options.version + ); mutableCoreKibanaRequest.body = body; mutableCoreKibanaRequest.params = params; mutableCoreKibanaRequest.query = query;