From a68706f83cb73936abd4782c50a922d64c6382aa Mon Sep 17 00:00:00 2001 From: Ruslan Pislari Date: Fri, 27 Sep 2024 13:33:18 +0300 Subject: [PATCH] feat: adding request uri set_path method --- nginx_module/src/http_request.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx_module/src/http_request.rs b/nginx_module/src/http_request.rs index 8bc3b17..6324cb6 100644 --- a/nginx_module/src/http_request.rs +++ b/nginx_module/src/http_request.rs @@ -258,6 +258,10 @@ impl<'a> HttpRequest<'a> { } } + pub fn set_path(&mut self, data: NgxStr<'a>) { + self.0.unparsed_uri = data.inner(); + } + pub fn headers_out_ref(&mut self) -> &mut ngx_http_headers_out_t { &mut self.0.headers_out }