summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2023-12-29 17:00:58 +0000
committerfeld <feld@feld.me>2023-12-29 17:00:58 +0000
commit8ac4458630026387a5394b427daa409b0d2667ba (patch)
tree67ef8b6dd1c7cc065dfaf9f1c614cb4d99667999 /lib
parenta6fc97ffecc7c48d46354c28af2275bafe4b7301 (diff)
parent2950397d476b0fd015b28182572927539b88e8fb (diff)
downloadpleroma-8ac4458630026387a5394b427daa409b0d2667ba.tar.gz
pleroma-8ac4458630026387a5394b427daa409b0d2667ba.zip
Merge branch 'finch-redirects' into 'develop'
Fix following redirects with Finch See merge request pleroma/pleroma!4023
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