projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
[akkoma]
/
lib
/
pleroma
/
reverse_proxy
/
reverse_proxy.ex
diff --git
a/lib/pleroma/reverse_proxy/reverse_proxy.ex
b/lib/pleroma/reverse_proxy/reverse_proxy.ex
index 4bbeb493cab5c9b0b41b8028d7ffe08796ed2b4a..aeaf9bd399dd055d82e82d794b8b2a898ae51b01 100644
(file)
--- a/
lib/pleroma/reverse_proxy/reverse_proxy.ex
+++ b/
lib/pleroma/reverse_proxy/reverse_proxy.ex
@@
-16,6
+16,8
@@
defmodule Pleroma.ReverseProxy do
@failed_request_ttl :timer.seconds(60)
@methods ~w(GET HEAD)
@failed_request_ttl :timer.seconds(60)
@methods ~w(GET HEAD)
+ def max_read_duration_default, do: @max_read_duration
+
@moduledoc """
A reverse proxy.
@moduledoc """
A reverse proxy.
@@
-370,6
+372,8
@@
defmodule Pleroma.ReverseProxy do
defp body_size_constraint(_, _), do: :ok
defp body_size_constraint(_, _), do: :ok
+ defp check_read_duration(nil = _duration, max), do: check_read_duration(@max_read_duration, max)
+
defp check_read_duration(duration, max)
when is_integer(duration) and is_integer(max) and max > 0 do
if duration > max do
defp check_read_duration(duration, max)
when is_integer(duration) and is_integer(max) and max > 0 do
if duration > max do