summaryrefslogtreecommitdiff
path: root/config/test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-03-13 21:15:42 +0300
committerrinpatch <rinpatch@sdf.org>2020-03-13 21:41:17 +0300
commitfc4496d4fa45b0389f8476b2c2ee00d647a1dfbe (patch)
treec917ced57828d225ea898ebe26c1d4b0e8205826 /config/test.exs
parent00d17520314e3591caaa7ab4ca39c6227a6bdf15 (diff)
downloadpleroma-fc4496d4fa45b0389f8476b2c2ee00d647a1dfbe.tar.gz
pleroma-fc4496d4fa45b0389f8476b2c2ee00d647a1dfbe.zip
rate limiter: disable based on if remote ip was found, not on if the plug was enabled
The current rate limiter disable logic won't trigger when the remote ip is not forwarded, only when the remoteip plug is not enabled, which is not the case on most instances since it's enabled by default. This changes the behavior to warn and disable when the remote ip was not forwarded, even if the RemoteIP plug is enabled. Also closes #1620
Diffstat (limited to 'config/test.exs')
-rw-r--r--config/test.exs2
1 files changed, 2 insertions, 0 deletions
diff --git a/config/test.exs b/config/test.exs
index a17886265..b8ea63c94 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -92,6 +92,8 @@ config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
+config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false
+
if File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
else