Sha256: af6490e3287209fabff12eb5d1863762bb667d18cc647007678589435527411e

Contents?: true

Size: 699 Bytes

Versions: 25

Compression:

Stored size: 699 Bytes

Contents

module Katello
  module Util
    module HttpProxy
      def proxy_uri
        URI("#{proxy_scheme}://#{proxy_user_info}@#{proxy_host}:#{proxy_port}").to_s if proxy_host
      end

      def proxy_user_info
        "#{proxy_config[:user]}:#{proxy_config[:password]}" if proxy_config && proxy_config[:user]
      end

      def proxy_config
        SETTINGS[:katello][:cdn_proxy]
      end

      def proxy_host
        proxy_config && URI.parse(proxy_config[:host]).host
      end

      def proxy_scheme
        proxy_config && URI.parse(proxy_config[:host]).scheme
      end

      def proxy_port
        proxy_config && proxy_config[:port]
      end
    end # HttpProxy
  end # Util
end # Katello

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
katello-3.11.2 app/lib/katello/util/http_proxy.rb
katello-3.10.2 app/lib/katello/util/http_proxy.rb
katello-3.10.1.1 app/lib/katello/util/http_proxy.rb
katello-3.10.1 app/lib/katello/util/http_proxy.rb
katello-3.11.1 app/lib/katello/util/http_proxy.rb
katello-3.11.0 app/lib/katello/util/http_proxy.rb
katello-3.11.0.rc2 app/lib/katello/util/http_proxy.rb
katello-3.11.0.rc1 app/lib/katello/util/http_proxy.rb
katello-3.10.0 app/lib/katello/util/http_proxy.rb
katello-3.10.0.rc1.1 app/lib/katello/util/http_proxy.rb
katello-3.9.1 app/lib/katello/util/http_proxy.rb
katello-3.10.0.rc1 app/lib/katello/util/http_proxy.rb
katello-3.9.0 app/lib/katello/util/http_proxy.rb
katello-3.8.1 app/lib/katello/util/http_proxy.rb
katello-3.9.0.rc2 app/lib/katello/util/http_proxy.rb
katello-3.9.0.rc1 app/lib/katello/util/http_proxy.rb
katello-3.7.1.1 app/lib/katello/util/http_proxy.rb
katello-3.7.1 app/lib/katello/util/http_proxy.rb
katello-3.8.0 app/lib/katello/util/http_proxy.rb
katello-3.8.0.rc3 app/lib/katello/util/http_proxy.rb