Merge branch 'finch-redirects' into 'develop'
Fix following redirects with Finch See merge request pleroma/pleroma!4023
This commit is contained in:
commit
8ac4458630
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]
|
||||
end
|
||||
|
||||
defp adapter_middlewares({Tesla.Adapter.Finch, _}) do
|
||||
[Tesla.Middleware.FollowRedirects]
|
||||
end
|
||||
|
||||
defp adapter_middlewares(_) do
|
||||
if Pleroma.Config.get(:env) == :test do
|
||||
# Emulate redirects in test env, which are handled by adapters in other environments
|
||||
|
Loading…
Reference in New Issue
Block a user