From d3ad2783ef13eefc298d9de9d3c220bc929f1132 Mon Sep 17 00:00:00 2001 From: "Lucas F. da Costa" Date: Wed, 5 Oct 2022 14:09:52 +0100 Subject: [PATCH] Use authorisation if present, regardless of environment (#138817) * fix: always send authorization to synth service when configured * [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../server/synthetics_service/service_api_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts index 93b47e9467be0..f447a21c3bee7 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts @@ -160,12 +160,11 @@ export class ServiceAPIClient { stack_version: this.kibanaVersion, is_edit: isEdit, }, - headers: - process.env.NODE_ENV !== 'production' && this.authorization - ? { - Authorization: this.authorization, - } - : undefined, + headers: this.authorization + ? { + Authorization: this.authorization, + } + : undefined, httpsAgent: this.getHttpsAgent(url), }) );