Skip to content

Commit

Permalink
configure DNS search
Browse files Browse the repository at this point in the history
  • Loading branch information
cplee committed Aug 10, 2018
1 parent 26c72a4 commit b0fa225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def nodejs_uri
# Resolve the SRV records for the hostname in the URL
def expand_url(url)
uri = URI(url)
resolver = Resolv::DNS.new()
resolver = Resolv::DNS.new(:search => [ENV["_SERVICE_DISCOVERY_NAME"]])
srv = resolver.getresource("_#{uri.scheme}._tcp.#{uri.host}", Resolv::DNS::Resource::IN::SRV)
uri.host = srv.target.to_s
uri.port = srv.port.to_s
Expand Down

0 comments on commit b0fa225

Please sign in to comment.