Commit 94030805 authored by Alexander Strizhakov's avatar Alexander Strizhakov

reverse proxy fix for opts

parent ffaa3c9e
......@@ -8,9 +8,7 @@ defmodule Pleroma.ReverseProxy.Client.Tesla do
@adapters [Tesla.Adapter.Gun]
def request(method, url, headers, body, opts \\ []) do
adapter_opts =
Keyword.get(opts, :adapter, [])
|> Keyword.put(:body_as, :chunks)
opts = Keyword.put(opts, :body_as, :chunks)
with {:ok, response} <-
Pleroma.HTTP.request(
......@@ -18,7 +16,7 @@ def request(method, url, headers, body, opts \\ []) do
url,
body,
headers,
Keyword.put(opts, :adapter, adapter_opts)
Keyword.put(opts, :adapter, opts)
) do
if is_map(response.body),
do: {:ok, response.status, response.headers, response.body},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment