Skip to content

Commit

Permalink
Use OS root certificiate bundle to avoid wordpress API via chef ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
Firefishy committed Dec 2, 2024
1 parent 294d381 commit 5fbc96e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cookbooks/wordpress/libraries/wordpress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def plugin_information(name)
end

def api_get(url)
@api_responses[url] ||= ::JSON.parse(::HTTPClient.new.get_content(url))
http_client = ::HTTPClient.new
http_client.ssl_config.set_trust_ca("/etc/ssl/certs/ca-certificates.crt")
@api_responses[url] ||= ::JSON.parse(http_client.get_content(url))
end
end
end
Expand Down

0 comments on commit 5fbc96e

Please sign in to comment.