body filter redirect
Dk Jack
dnj0496 at gmail.com
Mon Jul 12 19:47:46 UTC 2021
Hi,
In my module, I am trying to take actions based on the content of the body.
To accomplish this, I am capturing the body using body file as shown in the
example below:
http://mdounin.ru/hg/ngx_http_catch_body_filter_module/file/tip/ngx_http_catch_body_filter_module.c
This is working well. I can inspect the contents of the body and take
different actions like rejecting requests etc. However, one of the actions
I want to do is redirect the request based on the body content i.e if the
content contains some string etc, then redirect the request i.e change the
upstream/location etc. My question is, is it even possible to redirect a
request in the body filter stage? Is there another way to do body
capture/filter and still be able to redirect the request after inspecting
the body? Any help, suggestions or sample code is appreciated. Thanks.
Dk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20210712/41036b47/attachment.htm>
More information about the nginx-devel
mailing list