Controller: added "settings" configuration object.
It has the following structure and default values:
{
"http": {
"header_read_timeout": 30,
"body_read_timeout": 30,
"send_timeout": 30,
"idle_timeout": 180,
"max_body_size": 8388608
}
}
This commit is contained in:
@@ -73,7 +73,52 @@ static nxt_int_t nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt,
|
|||||||
nxt_str_t *name, nxt_conf_value_t *value);
|
nxt_str_t *name, nxt_conf_value_t *value);
|
||||||
|
|
||||||
|
|
||||||
|
static nxt_conf_vldt_object_t nxt_conf_vldt_http_members[] = {
|
||||||
|
{ nxt_string("header_read_timeout"),
|
||||||
|
NXT_CONF_VLDT_INTEGER,
|
||||||
|
NULL,
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
{ nxt_string("body_read_timeout"),
|
||||||
|
NXT_CONF_VLDT_INTEGER,
|
||||||
|
NULL,
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
{ nxt_string("send_timeout"),
|
||||||
|
NXT_CONF_VLDT_INTEGER,
|
||||||
|
NULL,
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
{ nxt_string("idle_timeout"),
|
||||||
|
NXT_CONF_VLDT_INTEGER,
|
||||||
|
NULL,
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
{ nxt_string("max_body_size"),
|
||||||
|
NXT_CONF_VLDT_INTEGER,
|
||||||
|
NULL,
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
NXT_CONF_VLDT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static nxt_conf_vldt_object_t nxt_conf_vldt_setting_members[] = {
|
||||||
|
{ nxt_string("http"),
|
||||||
|
NXT_CONF_VLDT_OBJECT,
|
||||||
|
&nxt_conf_vldt_object,
|
||||||
|
(void *) &nxt_conf_vldt_http_members },
|
||||||
|
|
||||||
|
NXT_CONF_VLDT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static nxt_conf_vldt_object_t nxt_conf_vldt_root_members[] = {
|
static nxt_conf_vldt_object_t nxt_conf_vldt_root_members[] = {
|
||||||
|
{ nxt_string("settings"),
|
||||||
|
NXT_CONF_VLDT_OBJECT,
|
||||||
|
&nxt_conf_vldt_object,
|
||||||
|
(void *) &nxt_conf_vldt_setting_members },
|
||||||
|
|
||||||
{ nxt_string("listeners"),
|
{ nxt_string("listeners"),
|
||||||
NXT_CONF_VLDT_OBJECT,
|
NXT_CONF_VLDT_OBJECT,
|
||||||
&nxt_conf_vldt_object_iterator,
|
&nxt_conf_vldt_object_iterator,
|
||||||
|
|||||||
@@ -1297,7 +1297,7 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
|
|||||||
nxt_router_access_log_t *access_log;
|
nxt_router_access_log_t *access_log;
|
||||||
nxt_router_listener_conf_t lscf;
|
nxt_router_listener_conf_t lscf;
|
||||||
|
|
||||||
static nxt_str_t http_path = nxt_string("/http");
|
static nxt_str_t http_path = nxt_string("/settings/http");
|
||||||
static nxt_str_t applications_path = nxt_string("/applications");
|
static nxt_str_t applications_path = nxt_string("/applications");
|
||||||
static nxt_str_t listeners_path = nxt_string("/listeners");
|
static nxt_str_t listeners_path = nxt_string("/listeners");
|
||||||
static nxt_str_t access_log_path = nxt_string("/access_log");
|
static nxt_str_t access_log_path = nxt_string("/access_log");
|
||||||
|
|||||||
Reference in New Issue
Block a user