From 71ad48095d92dd52a415eef499da32f8c27bb7fe Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 17 Jul 2023 01:38:54 +0200 Subject: 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 --- plugins/mod_http.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_http.lua') diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index cf5dbe0f..5b5cb6c8 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -29,8 +29,8 @@ local server = require "prosody.net.http.server"; server.set_default_host(module:get_option_string("http_default_host")); -server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); -server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); +server.set_option("body_size_limit", module:get_option_number("http_max_content_size", 0)); +server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size", 0)); -- CORS settings local cors_overrides = module:get_option("http_cors_override", {}); -- cgit v1.2.3