From 14d6d97bacf9b06ba340ebd4211b2f1b6ad417dd Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Thu, 20 Apr 2023 23:20:41 +0800 Subject: HTTP: added basic URI rewrite. This commit introduced the basic URI rewrite. It allows users to change request URI. Note the "rewrite" option ignores the contained query if any and the query from the request is preserverd. An example: "routes": [ { "match": { "uri": "/v1/test" }, "action": { "return": 200 } }, { "action": { "rewrite": "/v1$uri", "pass": "routes" } } ] Reviewed-by: Alejandro Colomar --- src/nxt_http_parse.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index 88b10675..fa95e842 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -127,6 +127,7 @@ nxt_uint_t nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash, nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx); +nxt_int_t nxt_http_parse_complex_target(nxt_http_request_parse_t *rp); nxt_buf_t *nxt_http_chunk_parse(nxt_task_t *task, nxt_http_chunk_parse_t *hcp, nxt_buf_t *in); -- cgit