mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fix duplicate header warning (#56491)
logged when attaching 2+ headers due to excessive check Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
3d96e4c95b
commit
598968f20f
2 changed files with 2 additions and 1 deletions
|
@ -721,6 +721,7 @@ describe('Auth', () => {
|
|||
res.ok({
|
||||
headers: {
|
||||
'www-authenticate': 'from handler',
|
||||
'another-header': 'yet another header',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
|
|
@ -120,8 +120,8 @@ export function adoptToHapiOnPreResponseFormat(fn: OnPreResponseHandler, log: Lo
|
|||
...(result.headers as any), // hapi types don't specify string[] as valid value
|
||||
};
|
||||
} else {
|
||||
findHeadersIntersection(response.headers, result.headers, log);
|
||||
for (const [headerName, headerValue] of Object.entries(result.headers)) {
|
||||
findHeadersIntersection(response.headers, result.headers, log);
|
||||
response.header(headerName, headerValue as any); // hapi types don't specify string[] as valid value
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue