[ML] Disabling secondary auth headers when security is disabled (#72371)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
7cee2a6b15
commit
b39c46eeac
1 changed files with 5 additions and 3 deletions
|
@ -7,7 +7,9 @@
|
||||||
import { KibanaRequest } from 'kibana/server';
|
import { KibanaRequest } from 'kibana/server';
|
||||||
|
|
||||||
export function getAuthorizationHeader(request: KibanaRequest) {
|
export function getAuthorizationHeader(request: KibanaRequest) {
|
||||||
return {
|
return request.headers.authorization === undefined
|
||||||
|
? {}
|
||||||
|
: {
|
||||||
headers: { 'es-secondary-authorization': request.headers.authorization },
|
headers: { 'es-secondary-authorization': request.headers.authorization },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue