Well, I did find the answer. I should have investigated the API little more
@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