mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-11 18:33:32 +00:00
Merge branch 'fix/mediaproxy-too-brutal' into 'develop'
Make MediaProxy failure tracking less brutal See merge request pleroma/pleroma!1836 (cherry picked from commit930cbd6d05
)9bdbf081
Make MediaProxy failure tracking less brutal
This commit is contained in:
parent
d9410c488a
commit
a8afbe977a
|
@ -401,11 +401,9 @@ defmodule Pleroma.ReverseProxy do
|
||||||
|
|
||||||
defp client, do: Pleroma.ReverseProxy.Client
|
defp client, do: Pleroma.ReverseProxy.Client
|
||||||
|
|
||||||
defp track_failed_url(url, code, opts) do
|
defp track_failed_url(url, error, opts) do
|
||||||
code = to_string(code)
|
|
||||||
|
|
||||||
ttl =
|
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)
|
Keyword.get(opts, :failed_request_ttl, @failed_request_ttl)
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Reference in a new issue