commit: 1f99abbeba88f852e02ac784d0ce7309785f3387
parent d9410c488a85bc8da87c1b662ed0a8ffac4d6466
Author: rinpatch <rinpatch@sdf.org>
Date: Sat, 12 Oct 2019 14:54:49 +0000
Merge branch 'cherry-pick-930cbd6d' into 'maint/1.1'
Backport mediaproxy failure tracking enchancements to maint
See merge request pleroma/pleroma!1837
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/pleroma/reverse_proxy/reverse_proxy.ex b/lib/pleroma/reverse_proxy/reverse_proxy.ex
@@ -401,11 +401,9 @@ defmodule Pleroma.ReverseProxy do
defp client, do: Pleroma.ReverseProxy.Client
- defp track_failed_url(url, code, opts) do
- code = to_string(code)
-
+ defp track_failed_url(url, error, opts) do
ttl =
- if code in ["403", "404"] or String.starts_with?(code, "5") do
+ unless error in [:body_too_large, 400, 204] do
Keyword.get(opts, :failed_request_ttl, @failed_request_ttl)
else
nil