config :tesla, adapter: Tesla.Adapter.Hackney
# Configures http settings, upstream proxy etc.
-config :pleroma, :http, proxy_url: nil
+config :pleroma, :http,
+ proxy_url: nil,
+ adapter: [
+ ssl_options: [
+ # We don't support TLS v1.3 yet
+ versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
+ ]
+ ]
config :pleroma, :instance,
name: "Pleroma",
options =
process_request_options(options)
|> process_sni_options(url)
+ |> process_adapter_options()
params = Keyword.get(options, :params, [])
end
end
+ def process_adapter_options(options) do
+ adapter_options = Pleroma.Config.get([:http, :adapter], [])
+
+ options ++ [adapter: adapter_options]
+ end
+
def process_request_options(options) do
config = Application.get_env(:pleroma, :http, [])
proxy = Keyword.get(config, :proxy_url, nil)