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

@@ -23,6 +23,8 @@ typedef enum {
NXT_HTTP_FOUND = 302,
NXT_HTTP_SEE_OTHER = 303,
NXT_HTTP_NOT_MODIFIED = 304,
NXT_HTTP_TEMPORARY_REDIRECT = 307,
NXT_HTTP_PERMANENT_REDIRECT = 308,
NXT_HTTP_BAD_REQUEST = 400,
NXT_HTTP_FORBIDDEN = 403,