Sorry I'm bad. I understood that header filters won't help you. Use the ACCESS PHASE handler, it should work fine for you.
On Wed, Dec 13, 2023 at 10:57 PM Vasiliy Soshnikov < vasiliy.soshni...@gmail.com> wrote: > Hello, > > > Is there something similar done before? > I'm thinking that you would like to test the incoming path and execute > some logic. > > You could use a header filter for that and also you could keep a body > filter for handling the request body. > Also pls take a look into PHASEs, I'm thinking you could try to add your > own ACCESS PHASE. > > And the last one: for keeping your context (some variables or data) for > this request between filters, phases you could use request's context. > > Probably, examples would help you: > https://github.com/dedok/nginx-tutorials > > > On Wed, Dec 13, 2023 at 10:56 AM Muhammad Nuzaihan <zai...@unrealasia.net> > wrote: > >> Hi, >> >> I need to process requests with only URI path (without body) for a module. >> >> It seems ngx_http_request_body_filter_pt is *not* executed whenever >> there is a request without a body (it looked like it bypassed without >> request body) and only ngx_http_output_body_filter_pt part of the >> code is executed. >> >> For example i do a request curl curl like this: >> >> curl -vvvv -X POST http://localhost:8080/proxy/profile/alice/comment >> >> and i need to validate /proxy/profile/alice/comment in my module and >> there is no http headers and no body. Only URI path. >> >> Is there something similar done before? >> >> Thank you, >> Muhammad Nuzaihan >> _______________________________________________ >> nginx-devel mailing list >> nginx-devel@nginx.org >> https://mailman.nginx.org/mailman/listinfo/nginx-devel >> >
_______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel