RestHighLevelClient - Accessing an elastic http endpoint behind reverse proxy

Well, I did find the answer. I should have investigated the API little more :slight_smile:

@Bean
public RestHighLevelClient elasticClient() {

return new RestHighLevelClient(RestClient.builder(
    new HttpHost(elastichost, elasticport, DEFAULT_SCHEME_NAME)).setPathPrefix("/elastic"));

}

Tookcare of the reverse proxy path prefix

2 Likes