total rebase
[anni] / patches / 2(fix_searches_p1).patch
1 From 08c8abc053d2b1b36f4cc21402a8df254a6c7795 Mon Sep 17 00:00:00 2001
2 From: Mint <>
3 Date: Wed, 31 May 2023 18:04:58 +0300
4 Subject: [PATCH] Enable redirect middleware for Hackney
5
6 ---
7  lib/pleroma/http.ex | 4 ++++
8  1 file changed, 4 insertions(+)
9
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]
16    end
17  
18 +  defp adapter_middlewares(Tesla.Adapter.Hackney) do
19 +    [Tesla.Middleware.FollowRedirects]
20 +  end
21 +
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
25 -- 
26 GitLab
27