diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-03-21 01:39:00 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-03-21 01:39:00 +0300 |
commit | c63b498f9416d26c1288a86ae4fc0b6007a16142 (patch) | |
tree | 7fe911579cc7f3aac50a0a649236195127cf767e /src/nxt_h1proto.c | |
parent | 35d6f84426cfaa27587456a8ebb81b13f60e697a (diff) | |
download | unit-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_h1proto.c')
-rw-r--r-- | src/nxt_h1proto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c index abc92dd4..5e3b2f82 100644 --- a/src/nxt_h1proto.c +++ b/src/nxt_h1proto.c @@ -1103,6 +1103,8 @@ static const nxt_str_t nxt_http_redirection[] = { nxt_string("HTTP/1.1 302 Found\r\n"), nxt_string("HTTP/1.1 303 See Other\r\n"), nxt_string("HTTP/1.1 304 Not Modified\r\n"), + nxt_string("HTTP/1.1 307 Temporary Redirect\r\n"), + nxt_string("HTTP/1.1 308 Permanent Redirect\r\n"), }; |