mirror of https://github.com/apache/lucene.git
SOLR-8048: bin/solr script should support basic auth credentials provided in solr.in.sh
This commit is contained in:
parent
ccf2070e53
commit
2e101c42ca
|
@ -164,7 +164,7 @@ public class SolrCLI {
|
||||||
|
|
||||||
HttpClientUtil.addRequestInterceptor((httpRequest, httpContext) -> {
|
HttpClientUtil.addRequestInterceptor((httpRequest, httpContext) -> {
|
||||||
String pair = ss.get(0) + ":" + ss.get(1);
|
String pair = ss.get(0) + ":" + ss.get(1);
|
||||||
byte[] encodedBytes = Base64.encodeBase64(pair.getBytes());
|
byte[] encodedBytes = Base64.encodeBase64(pair.getBytes(StandardCharsets.UTF_8));
|
||||||
httpRequest.addHeader(new BasicHeader("Authorization", "Basic "+ new String(encodedBytes)));
|
httpRequest.addHeader(new BasicHeader("Authorization", "Basic "+ new String(encodedBytes)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue