diff options
author | Alex S <alex.strizhakov@gmail.com> | 2019-08-22 12:37:33 +0300 |
---|---|---|
committer | Alex S <alex.strizhakov@gmail.com> | 2019-08-22 12:37:33 +0300 |
commit | 6e66bb35d1c2ab87e65e3249fbb427b80ca5b015 (patch) | |
tree | a69d057762ce650eefb0ad21287404bf0719cecb | |
parent | 540338aaa0cc55f969aedbe221b6a882b3c3d5f9 (diff) | |
download | pleroma-6e66bb35d1c2ab87e65e3249fbb427b80ca5b015.tar.gz |
was used with hackney
-rw-r--r-- | lib/pleroma/http/http.ex | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index da86ebcc7..5c0d66955 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -28,9 +28,7 @@ defmodule Pleroma.HTTP do """ def request(method, url, body \\ "", headers \\ [], options \\ []) do try do - options = - process_request_options(options) - |> process_sni_options(url) + options = process_request_options(options) adapter_gun? = Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun @@ -65,21 +63,6 @@ defmodule Pleroma.HTTP do end end - defp process_sni_options(options, nil), do: options - - defp process_sni_options(options, url) do - uri = URI.parse(url) - host = uri.host |> to_charlist() - - case uri.scheme do - "https" -> - options ++ [ssl: [server_name_indication: host]] - - _ -> - options - end - end - def process_request_options(options) do Keyword.merge(Pleroma.HTTP.Connection.options([]), options) end |