redhat_access 2.2.12 → 2.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/redhat_access/telemetry/look_ups.rb +36 -21
- data/lib/redhat_access/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9cd68efa44ac50cd24ec3fc1c4b1f9fd61752f4291d19a4b3e501e448d68c20
|
4
|
+
data.tar.gz: 2395b964158f86f3f9245afd76cd642d6d8859e612939b3b5e1f2e821ef2a67a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1acdb89a85f087486734587508c79e63b9d051d1929007577c107635652b6923f31fd8238357faa3d20833de1781dd81262defd03c49bd578c4b9f615cd33d3e
|
7
|
+
data.tar.gz: 3ecea8e8218a293818b409a4d7b62f92a34b00cf3f5afc2b9ce211cce813ab61c583614fbbdae81b7ce4fafd3b094b4cbddccac26e35f0b9ce1d72fd3cb4ded6
|
@@ -204,32 +204,47 @@ module RedhatAccess
|
|
204
204
|
begin
|
205
205
|
@http_proxy_string ||=
|
206
206
|
begin
|
207
|
-
|
208
|
-
|
207
|
+
proxy_uri = URI('')
|
208
|
+
|
209
|
+
if Setting[:content_default_http_proxy].present?
|
210
|
+
proxy_config = HttpProxy.default_global_content_proxy
|
211
|
+
proxy_uri = URI(proxy_config&.url)
|
212
|
+
if proxy_config&.username.present?
|
213
|
+
proxy_uri.user = CGI.escape(proxy_config&.username)
|
214
|
+
if proxy_config&.password.present?
|
215
|
+
proxy_uri.password = CGI.escape(proxy_config&.password)
|
216
|
+
end
|
217
|
+
end
|
209
218
|
end
|
219
|
+
|
220
|
+
if proxy_uri.to_s.blank?
|
221
|
+
if SETTINGS[:katello][:cdn_proxy] && SETTINGS[:katello][:cdn_proxy][:host]
|
222
|
+
proxy_config = SETTINGS[:katello][:cdn_proxy]
|
223
|
+
proxy_uri.scheme = URI.parse(proxy_config[:host]).scheme
|
224
|
+
proxy_uri.host = URI.parse(proxy_config[:host]).host
|
225
|
+
proxy_uri.port = proxy_config[:port] if proxy_config[:port]
|
226
|
+
if proxy_config[:user].present?
|
227
|
+
proxy_uri.user = CGI.escape(proxy_config[:user]) if proxy_config[:user]
|
228
|
+
if proxy_config[:password].present?
|
229
|
+
proxy_uri.password = CGI.escape(proxy_config[:password])
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Ruby's uri parser doesn't handle encoded characters so Katello added two new schemes to handle proxy
|
236
|
+
# passwords. See https://github.com/Katello/katello/blob/master/app/lib/katello/util/proxy_uri.rb
|
237
|
+
proxy_uri.scheme = 'proxy' if proxy_uri.scheme == 'http'
|
238
|
+
proxy_uri.scheme = 'proxys' if proxy_uri.scheme == 'https'
|
239
|
+
|
240
|
+
proxy_uri.to_s
|
210
241
|
end
|
211
242
|
|
212
|
-
if @http_proxy_string.blank?
|
213
|
-
if SETTINGS[:katello][:cdn_proxy] && SETTINGS[:katello][:cdn_proxy][:host]
|
214
|
-
proxy_config = SETTINGS[:katello][:cdn_proxy]
|
215
|
-
scheme = URI.parse(proxy_config[:host]).scheme
|
216
|
-
uri = URI('')
|
217
|
-
# Ruby's uri parser doesn't handle encoded characters so Katello added two new schemes to handle proxy
|
218
|
-
# passwords. See https://github.com/Katello/katello/blob/master/app/lib/katello/util/proxy_uri.rb
|
219
|
-
uri.scheme = 'proxy' if scheme == 'http'
|
220
|
-
uri.scheme = 'proxys' if scheme == 'https'
|
221
|
-
uri.host = URI.parse(proxy_config[:host]).host
|
222
|
-
uri.port = proxy_config[:port] if proxy_config[:port]
|
223
|
-
uri.user = CGI.escape(proxy_config[:user]) if proxy_config[:user]
|
224
|
-
uri.password = CGI.escape(proxy_config[:password]) if proxy_config[:password]
|
225
|
-
@http_proxy_string = uri.to_s
|
226
|
-
end
|
227
|
-
end
|
228
243
|
Rails.logger.debug("Insights proxy url = #{@http_proxy_string}")
|
229
244
|
@http_proxy_string
|
230
|
-
rescue
|
231
|
-
Rails.logger.debug("Something bad happened trying to get the proxy url
|
232
|
-
|
245
|
+
rescue
|
246
|
+
Rails.logger.debug("insights plugin: Something bad happened trying to get the proxy url")
|
247
|
+
raise
|
233
248
|
end
|
234
249
|
end
|
235
250
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redhat_access
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lindani Phiri
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-05-
|
12
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redhat_access_lib
|