From 1f78d23eed1fe80622837bc45831c406de244bef Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 8 Mar 2019 22:59:10 +0000 Subject: [PATCH] http: connection: unify adapter configuration and defaults --- lib/pleroma/http/connection.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/http/connection.ex b/lib/pleroma/http/connection.ex index 1477c6dd6..c0173465a 100644 --- a/lib/pleroma/http/connection.ex +++ b/lib/pleroma/http/connection.ex @@ -31,6 +31,10 @@ def new(opts \\ []) do # defp hackney_options(opts) do options = Keyword.get(opts, :adapter, []) - Keyword.merge(@hackney_options, options) + adapter_options = Pleroma.Config.get([:http, :adapter], []) + + @hackney_options + |> Keyword.merge(adapter_options) + |> Keyword.merge(options) end end