Skip to content

Commit

Permalink
Merge pull request #1203 from datacite/allow_other_es_hosts
Browse files Browse the repository at this point in the history
Change ES_HOST lookup for config swiching to just match on datacite.org
  • Loading branch information
richardhallett authored Jul 1, 2024
2 parents ae1d18c + 5470fda commit 971448d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/initializers/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 971448d

Please sign in to comment.