2020-10-12 17:00:50 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
2023-01-01 11:11:47 +00:00
|
|
|
# Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
|
2020-10-12 17:00:50 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-05-05 22:51:10 +00:00
|
|
|
defmodule Pleroma.HTTP.AdapterHelper.Default do
|
|
|
|
alias Pleroma.HTTP.AdapterHelper
|
|
|
|
|
|
|
|
@behaviour Pleroma.HTTP.AdapterHelper
|
|
|
|
|
|
|
|
@spec options(keyword(), URI.t()) :: keyword()
|
|
|
|
def options(opts, _uri) do
|
|
|
|
proxy = Pleroma.Config.get([:http, :proxy_url], nil)
|
|
|
|
AdapterHelper.maybe_add_proxy(opts, AdapterHelper.format_proxy(proxy))
|
|
|
|
end
|
|
|
|
|
|
|
|
@spec get_conn(URI.t(), keyword()) :: {:ok, keyword()}
|
|
|
|
def get_conn(_uri, opts), do: {:ok, opts}
|
|
|
|
end
|