diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-17 01:38:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-17 01:38:54 +0200 |
commit | 71ad48095d92dd52a415eef499da32f8c27bb7fe (patch) | |
tree | 0287ae06ee488c1b62e9e3eccbf4a9ae74b8370d /plugins/mod_websocket.lua | |
parent | 55768509a3f15b0476289f7a338d02e7233d1926 (diff) | |
download | prosody-71ad48095d92dd52a415eef499da32f8c27bb7fe.tar.gz prosody-71ad48095d92dd52a415eef499da32f8c27bb7fe.zip |
plugins: Use integer config API with interval specification where sensible
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
Diffstat (limited to 'plugins/mod_websocket.lua')
-rw-r--r-- | plugins/mod_websocket.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index b94ee92d..7120f3cc 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -28,9 +28,9 @@ local parse_close = websocket_frames.parse_close; local t_concat = table.concat; -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 stanza_size_limit = module:get_option_integer("c2s_stanza_size_limit", 1024 * 256, 10000); +local frame_buffer_limit = module:get_option_integer("websocket_frame_buffer_limit", 2 * stanza_size_limit, 0); +local frame_fragment_limit = module:get_option_integer("websocket_frame_fragment_limit", 8, 0); local stream_close_timeout = module:get_option_period("c2s_close_timeout", 5); local consider_websocket_secure = module:get_option_boolean("consider_websocket_secure"); local cross_domain = module:get_option("cross_domain_websocket"); |