Skip to content

Commit 19917a3

Browse files
authored
Merge pull request #1030 from Yuki-Inoue/master
add "[::1]" for localhost determination
2 parents d933001 + 7045dd0 commit 19917a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/webmock/util/uri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.encode_unsafe_chars_in_userinfo(userinfo)
6868

6969
def self.is_uri_localhost?(uri)
7070
uri.is_a?(Addressable::URI) &&
71-
%w(localhost 127.0.0.1 0.0.0.0).include?(uri.host)
71+
%w(localhost 127.0.0.1 0.0.0.0 [::1]).include?(uri.host)
7272
end
7373

7474
private

0 commit comments

Comments
 (0)