Module: Skylight::Core::Util::Proxy Private

Defined in:
lib/skylight/core/util/proxy.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.detect_url(env) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
7
8
9
10
# File 'lib/skylight/core/util/proxy.rb', line 4

def self.detect_url(env)
  u = env["HTTP_PROXY"] || env["http_proxy"]
  if u && !u.empty?
    u = "http://#{u}" unless u =~ %r{://}
    u
  end
end