Implemented "return" action.

The "return" action can be used to immediately generate a simple HTTP response
with an arbitrary status:

  {
      "action": {
          "return": 404
      }
  }

This is especially useful for denying access to specific resources.
This commit is contained in:
Valentin Bartenev
2020-03-27 17:22:52 +03:00
parent 5f9c4754cb
commit 8d727774e3
5 changed files with 96 additions and 4 deletions

View File

@@ -87,6 +87,7 @@ NXT_LIB_SRCS=" \
src/nxt_http_error.c \
src/nxt_http_route.c \
src/nxt_http_route_addr.c \
src/nxt_http_return.c \
src/nxt_http_static.c \
src/nxt_http_proxy.c \
src/nxt_application.c \