plugins/mod_http.lua
changeset 13218 5022525364f6
parent 13217 50324f66ca2a
child 13253 5884d58707fa
equal deleted inserted replaced
13217:50324f66ca2a 13218:5022525364f6
    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", 0));
    32 server.set_option("body_size_limit", module:get_option_number("http_max_content_size", nil, 0));
    33 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size", 0));
    33 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size", nil, 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" });