Skip to content
Snippets Groups Projects
Commit 7d62b216 authored by Vibhuti Sharma [Microsoft]'s avatar Vibhuti Sharma [Microsoft]
Browse files

debug

parent 7916e7dd
No related branches found
No related tags found
1 merge request!271Handle path prefix in elasticsearch url
Pipeline #90200 failed
......@@ -418,13 +418,12 @@ public class ElasticUtils {
}
public RestClientBuilder createClientBuilder(String url, String usernameAndPassword, int port) throws Exception {
log.info(String.format("url:%s, port:%s", url, port));
String scheme = this.sslEnabled ? "https" : "http";
url = url.trim().replaceAll("^(?i)(https?)://","");
URI uri = new URI(scheme + "://" + url);
log.info(String.format("url:%s, port:%s, scheme:%s", url, port, uri.getScheme()));
RestClientBuilder builder = RestClient.builder(new HttpHost(uri.getHost(), port, uri.getScheme()));
builder.setPathPrefix(uri.getPath());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment