equal
deleted
inserted
replaced
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" }); |