diff --git a/src/core/public/http/fetch.ts b/src/core/public/http/fetch.ts index cefaa353f7fa..d97512e75038 100644 --- a/src/core/public/http/fetch.ts +++ b/src/core/public/http/fetch.ts @@ -144,7 +144,6 @@ export class Fetch { headers: removedUndefined({ 'Content-Type': 'application/json', ...options.headers, - 'osd-version': this.params.opensearchDashboardsVersion, }), }; @@ -158,6 +157,12 @@ export class Fetch { fetchOptions.headers['osd-system-request'] = 'true'; } + // If base-path was explicitly asked to not be prepended, this must be an external call + // ToDo: Find out if the `osd-version` header serves any purpose + if (!shouldPrependBasePath) { + fetchOptions.headers['osd-version'] = this.params.opensearchDashboardsVersion; + } + return new Request(url, fetchOptions as RequestInit); }