HTTP: added TSTR validation flag to the rewrite option.
This is to improve error messages for rewrite configuration. Take the configuration as an example: { "rewrite": "`${a + " } Previously, when applying it the user would see this error message: failed to apply previous configuration After this change, the user will see this improved error message: the previous configuration is invalid: "SyntaxError: Unexpected end of input in default:1" in the "rewrite" value.
This commit is contained in:
parent
88854cf146
commit
49aee6760a
1 changed files with 1 additions and 0 deletions
|
@ -690,6 +690,7 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_action_common_members[] = {
|
|||
{
|
||||
.name = nxt_string("rewrite"),
|
||||
.type = NXT_CONF_VLDT_STRING,
|
||||
.flags = NXT_CONF_VLDT_TSTR,
|
||||
},
|
||||
{
|
||||
.name = nxt_string("response_headers"),
|
||||
|
|
Loading…
Reference in a new issue