Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ public void sanitizeHeaders() {
entry -> entry.getKey().equalsIgnoreCase("authorization")
|| entry.getKey().equalsIgnoreCase("es-secondary-authorization")
|| entry.getKey().equalsIgnoreCase("ES-Client-Authentication")
|| entry.getKey().equalsIgnoreCase("X-Client-Authentication")
);

final ThreadContextStruct newContext = new ThreadContextStruct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,8 @@ public void testSanitizeHeaders() {
final String authorizationHeader = randomCase("authorization");
final String authorizationHeader2 = randomCase("es-secondary-authorization");
final String authorizationHeader3 = randomCase("ES-Client-Authentication");
Set<String> possibleHeaders = Set.of(authorizationHeader, authorizationHeader2, authorizationHeader3);
final String authorizationHeader4 = randomCase("X-Client-Authentication");
Set<String> possibleHeaders = Set.of(authorizationHeader, authorizationHeader2, authorizationHeader3, authorizationHeader4);
Set<String> headers = randomizeHeaders
? randomSet(0, possibleHeaders.size(), () -> randomFrom(possibleHeaders))
: possibleHeaders;
Expand Down