1 From 08c8abc053d2b1b36f4cc21402a8df254a6c7795 Mon Sep 17 00:00:00 2001
3 Date: Wed, 31 May 2023 18:04:58 +0300
4 Subject: [PATCH] Enable redirect middleware for Hackney
7 lib/pleroma/http.ex | 4 ++++
8 1 file changed, 4 insertions(+)
10 diff --git a/lib/pleroma/http.ex b/lib/pleroma/http.ex
11 index d41061538d..a0e7d80f83 100644
12 --- a/lib/pleroma/http.ex
13 +++ b/lib/pleroma/http.ex
14 @@ -106,6 +106,10 @@ defp adapter_middlewares(Tesla.Adapter.Gun) do
15 [Tesla.Middleware.FollowRedirects, Pleroma.Tesla.Middleware.ConnectionPool]
18 + defp adapter_middlewares(Tesla.Adapter.Hackney) do
19 + [Tesla.Middleware.FollowRedirects]
22 defp adapter_middlewares(_) do
23 if Pleroma.Config.get(:env) == :test do
24 # Emulate redirects in test env, which are handled by adapters in other environments