aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_websocket.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-05-07 17:03:49 +0100
committerMatthew Wild <mwild1@gmail.com>2021-05-07 17:03:49 +0100
commit4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea (patch)
tree7aef7341dcea6d08c8fb676712d77982054b289c /plugins/mod_websocket.lua
parent4c7989e7e4c95ccfbdc189abc5bdea9aa9e90b02 (diff)
downloadprosody-4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea.tar.gz
prosody-4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea.zip
mod_c2s, mod_s2s, mod_component, mod_bosh, mod_websockets: Set default stanza size limits
c2s/bosh/ws streams will default to 256KB, s2s and components to 512KB. These values are aligned with ejabberd's default settings, which should reduce issues related to inconsistent size limits between servers on the XMPP network. The previous default (10MB) is excessive for any production server, and allows significant memory usage by even unauthenticated sessions.
Diffstat (limited to 'plugins/mod_websocket.lua')
-rw-r--r--plugins/mod_websocket.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index a613672b..60c76605 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -28,7 +28,7 @@ local parse_close = websocket_frames.parse_close;
local t_concat = table.concat;
-local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 10 * 1024 * 1024);
+local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024 * 256);
local frame_buffer_limit = module:get_option_number("websocket_frame_buffer_limit", 2 * stanza_size_limit);
local frame_fragment_limit = module:get_option_number("websocket_frame_fragment_limit", 8);
local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5);