Ensure Hackney and Finch both get the default middleware
This commit is contained in:
parent
c49dece0dd
commit
842090945a
1 changed files with 2 additions and 5 deletions
|
|
@ -110,10 +110,6 @@ defmodule Pleroma.HTTP do
|
||||||
extra_middleware
|
extra_middleware
|
||||||
end
|
end
|
||||||
|
|
||||||
defp adapter_middlewares({Tesla.Adapter.Finch, _}, extra_middleware) do
|
|
||||||
default_middleware() ++ extra_middleware
|
|
||||||
end
|
|
||||||
|
|
||||||
defp adapter_middlewares(_, extra_middleware) do
|
defp adapter_middlewares(_, extra_middleware) do
|
||||||
# A lot of tests are written expecting unencoded URLs
|
# A lot of tests are written expecting unencoded URLs
|
||||||
# and the burden of fixing that is high. Also it makes
|
# and the burden of fixing that is high. Also it makes
|
||||||
|
|
@ -127,8 +123,9 @@ defmodule Pleroma.HTTP do
|
||||||
# Emulate redirects in test env, which are handled by adapters in other environments
|
# Emulate redirects in test env, which are handled by adapters in other environments
|
||||||
[Tesla.Middleware.FollowRedirects]
|
[Tesla.Middleware.FollowRedirects]
|
||||||
|
|
||||||
|
# Hackney and Finch
|
||||||
true ->
|
true ->
|
||||||
extra_middleware
|
default_middleware() ++ extra_middleware
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue