diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb index 4270f54ff..c357f9014 100644 --- a/config/initializers/elasticsearch.rb +++ b/config/initializers/elasticsearch.rb @@ -3,8 +3,7 @@ require "faraday" require "faraday_middleware/aws_sigv4" -if ENV["ES_HOST"] == "elasticsearch.test.datacite.org" || - ENV["ES_HOST"] == "elasticsearch.datacite.org" +if ENV["ES_HOST"].end_with?(".datacite.org") Elasticsearch::Model.client = Elasticsearch::Client.new( host: ENV["ES_HOST"],