aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_limits.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-05-11 14:22:59 +0100
committerMatthew Wild <mwild1@gmail.com>2021-05-11 14:22:59 +0100
commit6f6c807bdf9eb25f335ace6f73243801019bbb87 (patch)
tree8dcb67d789dc32fb5b73d122d72e856ab5493e94 /plugins/mod_limits.lua
parent6d15e34180d46e5c9914be744870d14361fd010c (diff)
downloadprosody-6f6c807bdf9eb25f335ace6f73243801019bbb87.tar.gz
prosody-6f6c807bdf9eb25f335ace6f73243801019bbb87.zip
mod_limits: Use default limits if none configured
Diffstat (limited to 'plugins/mod_limits.lua')
-rw-r--r--plugins/mod_limits.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/mod_limits.lua b/plugins/mod_limits.lua
index 616dca1b..98b52a96 100644
--- a/plugins/mod_limits.lua
+++ b/plugins/mod_limits.lua
@@ -39,7 +39,16 @@ end
-- Process config option into limits table:
-- limits = { c2s = { bytes_per_second = X, burst_seconds = Y } }
-local limits = {};
+local limits = {
+ c2s = {
+ bytes_per_second = 10 * 1024;
+ burst_seconds = 2;
+ };
+ s2sin = {
+ bytes_per_second = 30 * 1024;
+ burst_seconds = 2;
+ };
+};
for sess_type, sess_limits in pairs(limits_cfg) do
limits[sess_type] = {