diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/application.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/http/http.ex | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 06d1a187e..347f520bb 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -165,7 +165,7 @@ defmodule Pleroma.Application do end defp gun_pools do - if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun do + if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun || Mix.env() == :test do for {pool_name, opts} <- Pleroma.Config.get([:gun_pools]) do %{ id: :"gun_pool_#{pool_name}", diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index ab0fd55de..b18ce2803 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -89,11 +89,15 @@ defmodule Pleroma.HTTP do case uri.scheme do "https" -> + adapter_opts = Keyword.get(options, :adapter, []) + tls_opts = - Keyword.get(options, :tls_opts, []) + Keyword.get(adapter_opts, :tls_opts, []) |> Keyword.put(:server_name_indication, host) - Keyword.put(options, :tls_opts, tls_opts) ++ [ssl: [server_name_indication: host]] + adapter_opts = Keyword.put(adapter_opts, :tls_opts, tls_opts) + + Keyword.put(options, :adapter, adapter_opts) ++ [ssl: [server_name_indication: host]] _ -> options |