summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2023-12-29 00:50:50 -0500
committerMark Felder <feld@feld.me>2023-12-29 00:50:50 -0500
commit2950397d476b0fd015b28182572927539b88e8fb (patch)
treeb255797d726e673ebf74ebe96df3de6845b9d74e /lib
parent3954dfd4f1881845a60f117a86ef96f3997c6c3c (diff)
downloadpleroma-2950397d476b0fd015b28182572927539b88e8fb.tar.gz
pleroma-2950397d476b0fd015b28182572927539b88e8fb.zip
Fix following redirects with Finch
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/http.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/http.ex b/lib/pleroma/http.ex
index d41061538..eec61cf14 100644
--- a/lib/pleroma/http.ex
+++ b/lib/pleroma/http.ex
@@ -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