diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-03 11:14:52 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-03 11:14:52 +0300 |
commit | 026b245dbc2900d90a737f024b87453bf552b62b (patch) | |
tree | 8bab0696129f9ba0154879f831cb7543b508a9f2 /lib/pleroma/reverse_proxy.ex | |
parent | 5bd41fef8b5aeff53ed6b096e04507d51c93a83a (diff) | |
parent | 1236c5dbf55d631b10ad0e73836a2a9cd43ddaa8 (diff) | |
download | pleroma-026b245dbc2900d90a737f024b87453bf552b62b.tar.gz |
Merge branch 'develop' into feature/polls-2-electric-boogalo
Diffstat (limited to 'lib/pleroma/reverse_proxy.ex')
-rw-r--r-- | lib/pleroma/reverse_proxy.ex | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex index 983e156f5..285d57309 100644 --- a/lib/pleroma/reverse_proxy.ex +++ b/lib/pleroma/reverse_proxy.ex @@ -61,8 +61,6 @@ defmodule Pleroma.ReverseProxy do * `http`: options for [hackney](https://github.com/benoitc/hackney). """ - @hackney Pleroma.Config.get(:hackney, :hackney) - @default_hackney_options [] @inline_content_types [ @@ -148,7 +146,7 @@ defmodule Pleroma.ReverseProxy do Logger.debug("#{__MODULE__} #{method} #{url} #{inspect(headers)}") method = method |> String.downcase() |> String.to_existing_atom() - case @hackney.request(method, url, headers, "", hackney_opts) do + case :hackney.request(method, url, headers, "", hackney_opts) do {:ok, code, headers, client} when code in @valid_resp_codes -> {:ok, code, downcase_headers(headers), client} @@ -198,7 +196,7 @@ defmodule Pleroma.ReverseProxy do duration, Keyword.get(opts, :max_read_duration, @max_read_duration) ), - {:ok, data} <- @hackney.stream_body(client), + {:ok, data} <- :hackney.stream_body(client), {:ok, duration} <- increase_read_duration(duration), sent_so_far = sent_so_far + byte_size(data), :ok <- body_size_constraint(sent_so_far, Keyword.get(opts, :max_body_size)), |