Comparison

plugins/mod_http.lua @ 13213:50324f66ca2a

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
author Kim Alvefur <zash@zash.se>
date Mon, 17 Jul 2023 01:38:54 +0200
parent 13209:c8d949cf6b09
child 13214:5022525364f6
comparison
equal deleted inserted replaced
13212:3e6e98cc63e9 13213:50324f66ca2a
27 27
28 local server = require "prosody.net.http.server"; 28 local server = require "prosody.net.http.server";
29 29
30 server.set_default_host(module:get_option_string("http_default_host")); 30 server.set_default_host(module:get_option_string("http_default_host"));
31 31
32 server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); 32 server.set_option("body_size_limit", module:get_option_number("http_max_content_size", 0));
33 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); 33 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size", 0));
34 34
35 -- CORS settings 35 -- CORS settings
36 local cors_overrides = module:get_option("http_cors_override", {}); 36 local cors_overrides = module:get_option("http_cors_override", {});
37 local opt_methods = module:get_option_set("access_control_allow_methods", { "GET", "OPTIONS" }); 37 local opt_methods = module:get_option_set("access_control_allow_methods", { "GET", "OPTIONS" });
38 local opt_headers = module:get_option_set("access_control_allow_headers", { "Content-Type" }); 38 local opt_headers = module:get_option_set("access_control_allow_headers", { "Content-Type" });