Skip to content

Commit

Permalink
Merge pull request #1030 from Yuki-Inoue/master
Browse files Browse the repository at this point in the history
add "[::1]" for localhost determination
  • Loading branch information
bblimke committed Aug 19, 2023
2 parents d933001 + 7045dd0 commit 19917a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webmock/util/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def self.encode_unsafe_chars_in_userinfo(userinfo)

def self.is_uri_localhost?(uri)
uri.is_a?(Addressable::URI) &&
%w(localhost 127.0.0.1 0.0.0.0).include?(uri.host)
%w(localhost 127.0.0.1 0.0.0.0 [::1]).include?(uri.host)
end

private
Expand Down

0 comments on commit 19917a3

Please sign in to comment.