Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
[ ] Example that reproduces the problem uploaded to Github
[x] Full description of the issue provided (see below)
Steps to Reproduce
set the property elasticsearch.defaultHeaders in the format that StringToHeaderConverter can convert
somehow inspect defaultHeaders in either RestClient built, or sniff http headers sent.
Expected Behaviour
The provided RestClient and the RestClient in the provided RestHighLevelClient are built with defaultHeaders filled with the values specified by the property and send requests with the headers by default.
Thanks for reporting an issue, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Task List
Steps to Reproduce
elasticsearch.defaultHeaders
in the format that StringToHeaderConverter can convertExpected Behaviour
The provided RestClient and the RestClient in the provided RestHighLevelClient are built with defaultHeaders filled with the values specified by the property and send requests with the headers by default.
Actual Behaviour
It does not seem to take defaultHeaders specified by the property, although the value in DefaultElasticsearchConfigurationProperties#defaultHeaders is set as expected.
Environment Information
Example Application
None.
I think this could be fixed by making DefaultElasticsearchClientFactory#restClientBuilder() configure RestClientBuilder#setDefaultHeaders() using elasticsearchConfiguration.getDefaultHeaders() as explained in the official doc.
Thank you.