class Bundler::URI::HTTP

def origin


Bundler::URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
Bundler::URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com"
Bundler::URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000"
Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com"

Example:


https://datatracker.ietf.org/doc/html/rfc6454.
Returns the origin for an HTTP uri, as defined in

== Description
def origin
  "#{scheme}://#{authority}"
end