From 96abad66eb7ca02fb33ea69e60ac066cde38c095 Mon Sep 17 00:00:00 2001 From: Brian Rak Date: Wed, 15 Jul 2026 11:46:42 -0400 Subject: [PATCH] Update documentation for ngx.req.set_uri set_uri causes ngx.req.is_internal() to become true - see https://github.com/openresty/lua-nginx-module/blame/de7e57f4b6c12699b4c47b6abb70817f1124026f/src/ngx_http_lua_uri.c#L122 This is not expected behavior IMO and warrents a note in the documentation. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 9c72a8c594..96c01ebba3 100644 --- a/README.markdown +++ b/README.markdown @@ -5253,7 +5253,7 @@ ngx.req.set_uri **context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua** -Rewrite the current request's (parsed) URI by the `uri` argument. The `uri` argument must be a Lua string and cannot be of zero length, or a Lua exception will be thrown. +Rewrite the current request's (parsed) URI by the `uri` argument. The `uri` argument must be a Lua string and cannot be of zero length, or a Lua exception will be thrown. After this function has been called, [ngx.req.is_internal](#ngxreqis_internal) will evaluate to true, even if this request came from a client. The optional boolean `jump` argument can trigger location rematch (or location jump) as [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html)'s [rewrite](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite) directive, that is, when `jump` is `true` (default to `false`), this function will never return and it will tell Nginx to try re-searching locations with the new URI value at the later `post-rewrite` phase and jumping to the new location.