smart_proxy_container_gateway 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1965b68bd7795a23fafce6976458a33bf58f8ef67ccab714ab52edcd69558e4e
|
4
|
+
data.tar.gz: f025588bd31da08bbf6fc2bfd9b58924a4d99d86571b689f6bbfdfc2a7e458dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8592a29f188ccc45ee9db74cf72579b5c63957ed4a9a64e015c7f3627bd2ee0fdf23e80efad608b690313fe5a4db28f2db0d5660a0a0a894736e500d1aa5bc78
|
7
|
+
data.tar.gz: eedefbd87696d56163aef9da0b6af8b4061bea74626054d4bf1c78b7d70425a61939db451a6081b79efdb42b17e248f1a8eaf037b5c882026bff7f5a79d87e62
|
@@ -41,7 +41,8 @@ module Proxy
|
|
41
41
|
container_instance.singleton_dependency :container_gateway_main_impl, (lambda do
|
42
42
|
Proxy::ContainerGateway::ContainerGatewayMain.new(
|
43
43
|
database: container_instance.get_dependency(:database_impl),
|
44
|
-
**settings.slice(:pulp_endpoint, :pulp_client_ssl_ca, :pulp_client_ssl_cert,
|
44
|
+
**settings.slice(:pulp_endpoint, :pulp_client_ssl_ca, :pulp_client_ssl_cert,
|
45
|
+
:pulp_client_ssl_key, :client_endpoint)
|
45
46
|
)
|
46
47
|
end)
|
47
48
|
end
|
@@ -46,8 +46,9 @@ module Proxy
|
|
46
46
|
status pulp_response.code.to_i
|
47
47
|
body pulp_response.body
|
48
48
|
else
|
49
|
-
|
50
|
-
|
49
|
+
redirection_uri = URI(pulp_response['location'])
|
50
|
+
redirection_uri.host = URI(container_gateway_main.client_endpoint).host
|
51
|
+
redirect(redirection_uri.to_s)
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
@@ -236,8 +237,9 @@ module Proxy
|
|
236
237
|
status pulp_response.code.to_i
|
237
238
|
body pulp_response.body
|
238
239
|
else
|
239
|
-
|
240
|
-
|
240
|
+
redirection_uri = URI(pulp_response['location'])
|
241
|
+
redirection_uri.host = URI(container_gateway_main.client_endpoint).host
|
242
|
+
redirect(redirection_uri.to_s)
|
241
243
|
end
|
242
244
|
end
|
243
245
|
|
@@ -9,17 +9,20 @@ module Proxy
|
|
9
9
|
extend ::Proxy::Log
|
10
10
|
|
11
11
|
class ContainerGatewayMain
|
12
|
-
attr_reader :database
|
12
|
+
attr_reader :database, :client_endpoint
|
13
13
|
|
14
|
-
|
14
|
+
# rubocop:disable Metrics/ParameterLists, Layout/LineLength
|
15
|
+
def initialize(database:, pulp_endpoint:, pulp_client_ssl_ca:, pulp_client_ssl_cert:, pulp_client_ssl_key:, client_endpoint: nil)
|
15
16
|
@database = database
|
16
17
|
@pulp_endpoint = pulp_endpoint
|
18
|
+
@client_endpoint = client_endpoint || pulp_endpoint
|
17
19
|
@pulp_client_ssl_ca = pulp_client_ssl_ca
|
18
20
|
@pulp_client_ssl_cert = OpenSSL::X509::Certificate.new(File.read(pulp_client_ssl_cert))
|
19
21
|
@pulp_client_ssl_key = OpenSSL::PKey::RSA.new(
|
20
22
|
File.read(pulp_client_ssl_key)
|
21
23
|
)
|
22
24
|
end
|
25
|
+
# rubocop:enable Metrics/ParameterLists, Layout/LineLength
|
23
26
|
|
24
27
|
def pulp_registry_request(uri, headers)
|
25
28
|
http_client = Net::HTTP.new(uri.host, uri.port)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_container_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ballou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|