Revolyssup commented on code in PR #9813: URL: https://github.com/apache/apisix/pull/9813#discussion_r1262751610
########## apisix/plugins/proxy-rewrite.lua: ########## @@ -345,8 +346,21 @@ function _M.rewrite(conf, ctx) else ctx.var.upstream_uri = upstream_uri end + else + ctx.var.upstream_uri = upstream_uri end + if conf.use_real_request_uri_unsafe and conf.regex_uri then + local index + if separator_escaped then + index = str_find(upstream_uri,"?") + end + if index then + upstream_uri = sub_str(upstream_uri, 1, index - 1) + ..sub_str(upstream_uri,index) + end + ctx.var.upstream_uri = upstream_uri + end Review Comment: To make regex_uri work with real_request_uri field. This is also what @AlinsRan had done in the diff shared. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org