summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.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_h1proto.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_h1proto.c')
-rw-r--r--src/nxt_h1proto.c2
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"),
};