Class: Gitlab::UrlBlocker::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitlab/url_blocker.rb

Overview

Result stores the validation result: uri - The original URI requested hostname - The hostname that should be used to connect. For DNS

rebinding protection, this will be the resolved IP address of
the hostname.

use_proxy -

If true, this means that the proxy server specified in the
http_proxy/https_proxy environment variables should be used.

If false, this either means that no proxy server was specified
or that the hostname in the URL is exempt via the no_proxy
environment variable. This allows the caller to disable usage
of a proxy since the IP address may be used to
connect. Otherwise, Net::HTTP may erroneously compare the IP
address against the no_proxy list.

Instance Attribute Summary collapse

Instance Attribute Details

#hostnameObject

Returns the value of attribute hostname

Returns:

  • (Object)

    the current value of hostname



27
28
29
# File 'lib/gitlab/url_blocker.rb', line 27

def hostname
  @hostname
end

#uriObject

Returns the value of attribute uri

Returns:

  • (Object)

    the current value of uri



27
28
29
# File 'lib/gitlab/url_blocker.rb', line 27

def uri
  @uri
end

#use_proxyObject

Returns the value of attribute use_proxy

Returns:

  • (Object)

    the current value of use_proxy



27
28
29
# File 'lib/gitlab/url_blocker.rb', line 27

def use_proxy
  @use_proxy
end