Skip to content

Commit

Permalink
Fixes #17935 - Remove endpoint for scap_content download (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
xprazak2 committed Mar 23, 2021
1 parent dd51e91 commit 8b4c664
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/smart_proxy_openscap/openscap_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,6 @@ class Api < ::Sinatra::Base
end
end

get "/policies/:policy_id/content" do
content_type 'application/xml'
logger.warn 'DEPRECATION WARNING: /policies/:policy_id/content/:digest should be used, please update foreman_openscap'
begin
Proxy::OpenSCAP::FetchScapContent.new.get_policy_content(params[:policy_id], 'scap_content')
rescue *HTTP_ERRORS => e
log_halt e.response.code.to_i, "File not found on Foreman. Wrong policy id?"
rescue StandardError => e
log_halt 500, "Error occurred: #{e.message}"
end
end

get "/policies/:policy_id/tailoring/:digest" do
content_type 'application/xml'
begin
Expand Down

0 comments on commit 8b4c664

Please sign in to comment.