Commit 9f2ca4ef authored by Alexander Strizhakov's avatar Alexander Strizhakov

tesla gun adapter supports sni

parent 2f13c8e7
......@@ -10,7 +10,8 @@ defmodule Pleroma.HTTP.Connection do
@options [
connect_timeout: 10_000,
timeout: 20_000,
pool: :federation
pool: :federation,
version: :master
]
@doc """
......
......@@ -89,15 +89,7 @@ defp process_sni_options(options, url) do
case uri.scheme do
"https" ->
adapter_opts = Keyword.get(options, :adapter, [])
tls_opts =
Keyword.get(adapter_opts, :tls_opts, [])
|> Keyword.put(: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 ++ [ssl: [server_name_indication: host]]
_ ->
options
......
......@@ -114,7 +114,7 @@ defp deps do
{
:tesla,
github: "alex-strizhakov/tesla",
ref: "245f75502052e53d45cdb44f6afb481f4bd0f576",
ref: "9f56f950a88a9ab0c21ad351e2cfd47b98594310",
override: true
},
{:cowlib, "~> 2.7.3", override: true},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment