From 5b6d0885a44d5b5027f15c866de9d7c39e5f71b0 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 27 Aug 2024 16:48:51 +0200 Subject: [PATCH] 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: 21aa39e28f19 ("Fixes #37308 - set REMOTE_USER properly for pulpcore registry") --- manifests/plugin/container.pp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/manifests/plugin/container.pp b/manifests/plugin/container.pp index 78c8f38..c1587ae 100644 --- a/manifests/plugin/container.pp +++ b/manifests/plugin/container.pp @@ -9,14 +9,6 @@ String $location_prefix = '/pulpcore_registry', String $registry_version_path = '/v2/', ) { - $api_default_request_headers = [ - "unset ${pulpcore::apache::remote_user_environ_header}", - ] - - $api_additional_request_headers = $pulpcore::api_client_auth_cn_map.map |String $cn, String $pulp_user| { - "set ${pulpcore::apache::remote_user_environ_header} \"${pulp_user}\" \"expr=%{SSL_CLIENT_S_DN_CN} == '${cn}'\"" - } - $context = { 'directories' => [ { @@ -27,7 +19,7 @@ 'url' => "${pulpcore::apache::api_base_url}${registry_version_path}", }, ], - 'request_headers' => $api_default_request_headers + $api_additional_request_headers, + 'request_headers' => $pulpcore::apache::api_default_request_headers + $pulpcore::apache::api_additional_request_headers, }, ], 'proxy_pass' => [