Sha256: 8207080d3567fbcb70f35d573f040325e07d373d14a343ad1d8450e7932bc78a

Contents?: true

Size: 822 Bytes

Versions: 14

Compression:

Stored size: 822 Bytes

Contents

if (SETTINGS[:katello][:cdn_proxy] && SETTINGS[:katello][:cdn_proxy][:host])
  config = SETTINGS[:katello][:cdn_proxy]
  uri = URI(config[:host])
  uri.user = nil
  uri.password = nil
  uri.port = config[:port] if config[:port]

  name = uri.host
  if (http_proxy = ::HttpProxy.where(name: name).first)
    http_proxy.update_attributes!(url: uri.to_s,
                                  username: config[:user],
                                  password: config[:password])
  else
    ::HttpProxy.create!(name: name,
                        url: uri.to_s,
                        username: config[:user],
                        password: config[:password])
  end

  if Setting[:content_default_http_proxy] != name
    Setting[:content_default_http_proxy] = name
  end
else
  Setting[:content_default_http_proxy] = ''
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
katello-3.15.0.rc1.1 db/seeds.d/115-http_proxy.rb
katello-3.15.0.rc1 db/seeds.d/115-http_proxy.rb
katello-3.14.1 db/seeds.d/115-http_proxy.rb
katello-3.13.4 db/seeds.d/115-http_proxy.rb
katello-3.14.0 db/seeds.d/115-http_proxy.rb
katello-3.13.3 db/seeds.d/115-http_proxy.rb
katello-3.14.0.rc2 db/seeds.d/115-http_proxy.rb
katello-3.13.2 db/seeds.d/115-http_proxy.rb
katello-3.14.0.rc1 db/seeds.d/115-http_proxy.rb
katello-3.13.1 db/seeds.d/115-http_proxy.rb
katello-3.13.0 db/seeds.d/115-http_proxy.rb
katello-3.13.0.rc2.1 db/seeds.d/115-http_proxy.rb
katello-3.13.0.rc2 db/seeds.d/115-http_proxy.rb
katello-3.13.0.rc1 db/seeds.d/115-http_proxy.rb