module Rack::Request::Helpers

def hostname

brackets are removed.
as +host+. In the case of IPv6 or future address formats, the square
In the case of a domain name or IPv4 address, the result is the same
Returns an address suitable for being to resolve to an address.
def hostname
  split_authority(self.authority)[1]
end