HTTP: controlling response headers support.
This commit is contained in:
@@ -583,6 +583,11 @@ static nxt_conf_map_t nxt_http_route_action_conf[] = {
|
||||
NXT_CONF_MAP_PTR,
|
||||
offsetof(nxt_http_action_conf_t, rewrite)
|
||||
},
|
||||
{
|
||||
nxt_string("response_headers"),
|
||||
NXT_CONF_MAP_PTR,
|
||||
offsetof(nxt_http_action_conf_t, set_headers)
|
||||
},
|
||||
{
|
||||
nxt_string("pass"),
|
||||
NXT_CONF_MAP_PTR,
|
||||
@@ -671,6 +676,13 @@ nxt_http_action_init(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
|
||||
}
|
||||
}
|
||||
|
||||
if (acf.set_headers != NULL) {
|
||||
ret = nxt_http_set_headers_init(rtcf, action, &acf);
|
||||
if (nxt_slow_path(ret != NXT_OK)) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (acf.ret != NULL) {
|
||||
return nxt_http_return_init(rtcf, action, &acf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user