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>
This commit is contained in:
Lucas F. da Costa 2022-10-05 14:09:52 +01:00 committed by GitHub
parent 322cadcbe4
commit 276cd3d0ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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),
})
);