Skip to content

Commit 5b6d088

Browse files
committed
Reuse headers from pulpcore::apache class
We have the exact same code in both pulpcore::plugin::container as in pulpcore::apache. This reuses the variables rather than duplicating the logic. Fixes: 21aa39e ("Fixes #37308 - set REMOTE_USER properly for pulpcore registry")
1 parent c63cb65 commit 5b6d088

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

manifests/plugin/container.pp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
String $location_prefix = '/pulpcore_registry',
1010
String $registry_version_path = '/v2/',
1111
) {
12-
$api_default_request_headers = [
13-
"unset ${pulpcore::apache::remote_user_environ_header}",
14-
]
15-
16-
$api_additional_request_headers = $pulpcore::api_client_auth_cn_map.map |String $cn, String $pulp_user| {
17-
"set ${pulpcore::apache::remote_user_environ_header} \"${pulp_user}\" \"expr=%{SSL_CLIENT_S_DN_CN} == '${cn}'\""
18-
}
19-
2012
$context = {
2113
'directories' => [
2214
{
@@ -27,7 +19,7 @@
2719
'url' => "${pulpcore::apache::api_base_url}${registry_version_path}",
2820
},
2921
],
30-
'request_headers' => $api_default_request_headers + $api_additional_request_headers,
22+
'request_headers' => $pulpcore::apache::api_default_request_headers + $pulpcore::apache::api_additional_request_headers,
3123
},
3224
],
3325
'proxy_pass' => [

0 commit comments

Comments
 (0)