[ML] Sending secondary auth headers to _explain (#79814)

This commit is contained in:
James Gowdy 2020-10-07 09:00:43 +01:00 committed by GitHub
parent 603adab5e7
commit 57f6ecda73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -282,9 +282,12 @@ export function dataFrameAnalyticsRoutes({ router, mlLicense }: RouteInitializat
},
mlLicense.fullLicenseAPIGuard(async ({ client, request, response }) => {
try {
const { body } = await client.asInternalUser.ml.explainDataFrameAnalytics({
body: request.body,
});
const { body } = await client.asInternalUser.ml.explainDataFrameAnalytics(
{
body: request.body,
},
getAuthorizationHeader(request)
);
return response.ok({
body,
});