Merge the default options with custom ones in ReverseProxy and
Pleroma.HTTP
This commit is contained in:
parent
5999780e82
commit
b001b8891a
3 changed files with 5 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ defmodule Pleroma.HTTP.Connection do
|
|||
|
||||
# fetch Hackney options
|
||||
#
|
||||
defp hackney_options(opts) do
|
||||
def hackney_options(opts) do
|
||||
options = Keyword.get(opts, :adapter, [])
|
||||
adapter_options = Pleroma.Config.get([:http, :adapter], [])
|
||||
proxy_url = Pleroma.Config.get([:http, :proxy_url], nil)
|
||||
|
|
|
|||
|
|
@ -65,10 +65,7 @@ defmodule Pleroma.HTTP do
|
|||
end
|
||||
|
||||
def process_request_options(options) do
|
||||
case Pleroma.Config.get([:http, :proxy_url]) do
|
||||
nil -> options
|
||||
proxy -> options ++ [proxy: proxy]
|
||||
end
|
||||
Keyword.merge(Pleroma.HTTP.Connection.hackney_options([]), options)
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue