From 618e170f28ba53c92f50ea53b7867fcee4172c47 Mon Sep 17 00:00:00 2001 From: Yusei Yamanaka Date: Wed, 12 Aug 2015 00:16:25 +0900 Subject: [PATCH] Use Addressable::URI#hostname instead of Addressable::URI#host --- lib/reverse_proxy/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reverse_proxy/client.rb b/lib/reverse_proxy/client.rb index d872787..1be21aa 100644 --- a/lib/reverse_proxy/client.rb +++ b/lib/reverse_proxy/client.rb @@ -79,7 +79,7 @@ module ReverseProxy target_request['Accept-Encoding'] = nil # Make the request - Net::HTTP.start(uri.host, uri.port, use_ssl: (uri.scheme == "https")) do |http| + Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == "https")) do |http| target_response = http.request(target_request) end @@ -141,4 +141,4 @@ module ReverseProxy name.sub(/^HTTP_/, "").gsub("_", "-") end end -end \ No newline at end of file +end