File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/org/springframework/data/elasticsearch/client/reactive Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,15 @@ static WebClientProvider getWebClientProvider(ClientConfiguration clientConfigur
256
256
HttpHeaders suppliedHeaders = clientConfiguration .getHeadersSupplier ().get ();
257
257
258
258
if (suppliedHeaders != null && suppliedHeaders != HttpHeaders .EMPTY ) {
259
+
260
+ // remove content-type and accept if they are provided by the client configuration (ES7 compatibility headers)
261
+ if (suppliedHeaders .containsKey (HttpHeaders .CONTENT_TYPE )) {
262
+ httpHeaders .remove (HttpHeaders .CONTENT_TYPE );
263
+ }
264
+ if (suppliedHeaders .containsKey (HttpHeaders .ACCEPT )) {
265
+ httpHeaders .remove (HttpHeaders .ACCEPT );
266
+ }
267
+
259
268
httpHeaders .addAll (suppliedHeaders );
260
269
}
261
270
}));
You can’t perform that action at this time.
0 commit comments