lib/acme/client/resources/directory.rb in acme-client-2.0.8 vs lib/acme/client/resources/directory.rb in acme-client-2.0.9

- old
+ new

@@ -66,11 +66,15 @@ raise Acme::Client::Error::InvalidDirectory, "Invalid directory url\n#{@directory} did not return a valid directory\n#{exception.inspect}" end def fetch_directory - connection = Faraday.new(url: @directory, **@connection_options) + connection = Faraday.new(url: @directory, **@connection_options) do |configuration| + configuration.use Acme::Client::FaradayMiddleware, client: nil, mode: nil + + configuration.adapter Faraday.default_adapter + end connection.headers[:user_agent] = Acme::Client::USER_AGENT response = connection.get(@url) - JSON.parse(response.body) + response.body end end