Skip to content

Commit

Permalink
Ignore adding branch_id to compliance policies requests
Browse files Browse the repository at this point in the history
  • Loading branch information
parthaa committed Feb 26, 2025
1 parent 38eb35b commit c6b7908
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/services/foreman_rh_cloud/cloud_request_forwarder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def prepare_forward_payload(original_request, controller_name)

def prepare_forward_params(original_request, branch_id)
forward_params = original_request.query_parameters
if original_request.user_agent && !original_request.user_agent.include?('redhat_access_cfme')
compliance_request = original_request.path.match?(/compliance\/v2\/systems\/.+\/policies/)
user_agent = original_request.user_agent.present? && !original_request.user_agent.include?('redhat_access_cfme')
if user_agent && !compliance_request
forward_params = forward_params.merge(:branch_id => branch_id)
end

Expand Down

0 comments on commit c6b7908

Please sign in to comment.