# File src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/utils.rb, line 80 def local_socket_address?(address) case get_socket_address_type(address) when :unix return true when :tcp host, _port = address.sub(%r{^tcp://}, '').split(':', 2) host == '127.0.0.1' || host == '::1' || host == 'localhost' else raise ArgumentError, "Unknown socket address type for '#{address}'." end end