Skip to content

Commit

Permalink
Skip adding authorization header if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
FujiHaruka committed Oct 13, 2021
1 parent 06ed140 commit f2cafd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public HttpResponse clientToProxyRequest(HttpObject httpObject) {
}
}

if (base64CredentialsForHostname != null) {
if (!httpRequest.headers().contains(HttpHeaderNames.AUTHORIZATION) && base64CredentialsForHostname != null) {
httpRequest.headers().add(HttpHeaderNames.AUTHORIZATION, "Basic " + base64CredentialsForHostname);
}
}
Expand Down

0 comments on commit f2cafd4

Please sign in to comment.