smart_proxy_container_gateway 4.0.3 → 4.0.4

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: 51be06cfca565b2e088e6f96c24d4b8eacb5818b0a8a9c8696910864302e7eaa
4
- data.tar.gz: 3b166dc90aef6c94cf45f5846cebbf67a89398600043db1065dd8ea1d367b0ce
3
+ metadata.gz: 4071f3495101c182650fbb5a894701d1d60d6a552eb43e4f1f7e07c558e75d7e
4
+ data.tar.gz: d7b251ba17c8e9360bc7fe88bbca8764be924f16ec41b061be0dc525604cebae
5
5
  SHA512:
6
- metadata.gz: 115ddb179a2f0c07e956fc104a93e2d9b09c96ff79c32cc5ce4559a6880c58ea3318b6df7e91b146d74f2bad38a26a8346a97633cb4fa4f08a5ac183b34ea71f
7
- data.tar.gz: '08b1fcac07ae9a2ecc9186f70fceac3369080035775a49966638c4d4f41fdd6db2cdc2230d0de9a24690a2e1870c673baffeba30b1c73e1f23c6fc771f7ac09a'
6
+ metadata.gz: c6c2eede99c97f359b6a9803b94eeab8d74325b84e2fb381c71e7a1626a7248c7f098737a8bbf2fb4418f0f0b246bae7e6084d69d7b05404ae133f5b9b30cf64
7
+ data.tar.gz: 88d1890fcd6a3c2ca7724151175cc29badc8ae21b7a1e94a7f7098c20d18a777c133c874d25598c47fb7d2cf1435d50b1d0e6fd3ae9603c43ae10da0d715bd0b
data/README.md CHANGED
@@ -30,7 +30,7 @@ The Container Gateway plugin requires a Pulp 3 instance to connect to. Related
30
30
  ```
31
31
  :pulp_endpoint: 'https://your_pulp_3_server_here.com'
32
32
  :pulp_client_ssl_cert: 'Path to X509 certificate for authenticating with Pulp'
33
- :pulp_client_ssl_key: 'Path to RSA private key for the Pulp certificate'
33
+ :pulp_client_ssl_key: 'Path to private key for the Pulp certificate'
34
34
  ```
35
35
 
36
36
  # Database information
@@ -78,10 +78,19 @@ module Proxy
78
78
  if pulp_response.code.to_i >= 400
79
79
  status pulp_response.code.to_i
80
80
  body pulp_response.body
81
- else
81
+ elsif [301, 302, 307].include?(pulp_response.code.to_i)
82
82
  redirection_uri = URI(pulp_response['location'])
83
83
  redirection_uri.host = URI(container_gateway_main.client_endpoint).host
84
84
  redirect(redirection_uri.to_s)
85
+ else
86
+ status pulp_response.code.to_i
87
+ digest = pulp_response['docker-content-digest']
88
+ content_type = pulp_response['content-type']
89
+ content_length = pulp_response['content-length']
90
+ response.headers['Docker-Content-Digest'] = digest if digest
91
+ response.headers['Content-Type'] = content_type if content_type
92
+ response.headers['Content-Length'] = content_length if content_length
93
+ body pulp_response.body
85
94
  end
86
95
  end
87
96
 
@@ -19,9 +19,7 @@ module Proxy
19
19
  @client_endpoint = client_endpoint || pulp_endpoint
20
20
  @pulp_client_ssl_ca = pulp_client_ssl_ca
21
21
  @pulp_client_ssl_cert = OpenSSL::X509::Certificate.new(File.read(pulp_client_ssl_cert))
22
- @pulp_client_ssl_key = OpenSSL::PKey::RSA.new(
23
- File.read(pulp_client_ssl_key)
24
- )
22
+ @pulp_client_ssl_key = OpenSSL::PKey.read(File.read(pulp_client_ssl_key))
25
23
  end
26
24
  # rubocop:enable Metrics/ParameterLists, Layout/LineLength
27
25
 
@@ -1,5 +1,5 @@
1
1
  module Proxy
2
2
  module ContainerGateway
3
- VERSION = '4.0.3'.freeze
3
+ VERSION = '4.0.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_container_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ballou