Skip to content

Commit 33a5b57

Browse files
committed
Removed headers
1 parent ae73af6 commit 33a5b57

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

lib/searchkick.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def self.client
8888
if client_type == :opensearch
8989
OpenSearch::Client.new({
9090
url: ENV["OPENSEARCH_URL"],
91-
# TODO remove headers in Searchkick 6
92-
transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}},
91+
transport_options: {request: {timeout: timeout}},
9392
retry_on_failure: 2
9493
}.deep_merge(client_options)) do |f|
9594
f.use Searchkick::Middleware
@@ -98,15 +97,9 @@ def self.client
9897
else
9998
raise Error, "The `elasticsearch` gem must be 7+" if Elasticsearch::VERSION.to_i < 7
10099

101-
transport_options = {request: {timeout: timeout}}
102-
# TODO remove headers in Searchkick 6
103-
if Elasticsearch::VERSION.to_i < 9
104-
transport_options[:headers] = {content_type: "application/json"}
105-
end
106-
107100
Elasticsearch::Client.new({
108101
url: ENV["ELASTICSEARCH_URL"],
109-
transport_options: transport_options,
102+
transport_options: {request: {timeout: timeout}},
110103
retry_on_failure: 2
111104
}.deep_merge(client_options)) do |f|
112105
f.use Searchkick::Middleware

0 commit comments

Comments
 (0)