Implemented "location" option for "return" action.

This allows to specify redirects:

  {
      "action": {
          "return": 301,
          "location": "https://www.example.com/"
      }
  }
This commit is contained in:
Valentin Bartenev
2020-03-21 01:39:00 +03:00
parent 35d6f84426
commit c63b498f94
5 changed files with 60 additions and 2 deletions

View File

@@ -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
};