Skip to content

Provide a configuration property for Elasticsearch path prefix #25010

@TarekSaid

Description

@TarekSaid

As of Spring Boot 2.4.2, with spring-data if the ES server is behind a reverse proxy with a prefix, there's no way to use Spring Boot's autoconfiguration for spring.elasticsearch.rest or spring.data.elasticsearch.client.reactive properties. One has to use the AbstractElasticsearchConfiguration in order to use the ClientConfiguration.builder().withPathPrefix(prefix). The horror.

Ideally, we could:

  • directly specify the path-prefix in the spring.elasticsearch.rest.uris property (useful in case there are multiple urls, each with its own path prefix). I don't know how that would work with spring.data.elasticsearch.client.reactive.endpoints, as it only uses a host:port format.
  • specify the path-prefix in a spring.elasticsearch.rest.path-prefix or spring.data.elasticsearch.client.reactive.path-prefix property. In that case, it would behave like the withPathPrefix(String) method, applying the prefix to all the uris/endpoints in the list

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions