summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf_validation.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-03-21 01:39:00 +0300
committerValentin Bartenev <vbart@nginx.com>2020-03-21 01:39:00 +0300
commitc63b498f9416d26c1288a86ae4fc0b6007a16142 (patch)
tree7fe911579cc7f3aac50a0a649236195127cf767e /src/nxt_conf_validation.c
parent35d6f84426cfaa27587456a8ebb81b13f60e697a (diff)
downloadunit-c63b498f9416d26c1288a86ae4fc0b6007a16142.tar.gz
unit-c63b498f9416d26c1288a86ae4fc0b6007a16142.tar.bz2
Implemented "location" option for "return" action.
This allows to specify redirects: { "action": { "return": 301, "location": "https://www.example.com/" } }
Diffstat (limited to 'src/nxt_conf_validation.c')
-rw-r--r--src/nxt_conf_validation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index ad921a7e..3227a7e9 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -362,6 +362,11 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_return_action_members[] = {
&nxt_conf_vldt_return,
NULL },
+ { nxt_string("location"),
+ NXT_CONF_VLDT_STRING,
+ NULL,
+ NULL },
+
NXT_CONF_VLDT_END
};