[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
|
@ -7,7 +7,9 @@
|
|||
import { KibanaRequest } from 'kibana/server';
|
||||
|
||||
export function getAuthorizationHeader(request: KibanaRequest) {
|
||||
return {
|
||||
headers: { 'es-secondary-authorization': request.headers.authorization },
|
||||
};
|
||||
return request.headers.authorization === undefined
|
||||
? {}
|
||||
: {
|
||||
headers: { 'es-secondary-authorization': request.headers.authorization },
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue