Fix following redirects with Finch
This commit is contained in:
parent
3954dfd4f1
commit
2950397d47
|
@ -0,0 +1 @@
|
||||||
|
Following HTTP Redirects when the HTTP Adapter is Finch
|
|
@ -106,6 +106,10 @@ defp adapter_middlewares(Tesla.Adapter.Gun) do
|
||||||
[Tesla.Middleware.FollowRedirects, Pleroma.Tesla.Middleware.ConnectionPool]
|
[Tesla.Middleware.FollowRedirects, Pleroma.Tesla.Middleware.ConnectionPool]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp adapter_middlewares({Tesla.Adapter.Finch, _}) do
|
||||||
|
[Tesla.Middleware.FollowRedirects]
|
||||||
|
end
|
||||||
|
|
||||||
defp adapter_middlewares(_) do
|
defp adapter_middlewares(_) do
|
||||||
if Pleroma.Config.get(:env) == :test do
|
if Pleroma.Config.get(:env) == :test 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
|
||||||
|
|
Loading…
Reference in New Issue