Fix following redirects with Finch
This commit is contained in:
parent
3954dfd4f1
commit
2950397d47
1
changelog.d/finch_redirects.fix
Normal file
1
changelog.d/finch_redirects.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Following HTTP Redirects when the HTTP Adapter is Finch
|
@ -106,6 +106,10 @@ defmodule Pleroma.HTTP 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
Block a user