module Rack::Request::Helpers

def authority

In HTTP/2, this is the `:authority` pseudo-header.
In HTTP/1, this is the `host` header.

https://tools.ietf.org/html/rfc3986#section-3.2
The authority of the incoming request as defined by RFC3976.
def authority
  forwarded_authority || host_authority || server_authority
end