Input filters in Nginx?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Input filters in Nginx?

j94305
Hi all. I did some search on the web and the archives here and did not find
an conclusive answer to this question.

Apache has both input a filters (work on the request before content
generation) and output filters (work on generated content). As I am
exploring the possibility to port some Apache modules that transform data in
both directions in a proxy-setup to Nginx, I am wondering whether Nginx has
input filters as well. What I have read about Nginx modules seem to indicate
that it does not. Is that correct?

I am aware that I could hack something into the proxy module, but I would
like to avoid that approach.

Thanks for any insights or pointers.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286038,286038#msg-286038

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Input filters in Nginx?

Maxim Dounin
Hello!

On Tue, Oct 29, 2019 at 09:49:29AM -0400, awagner wrote:

> Hi all. I did some search on the web and the archives here and did not find
> an conclusive answer to this question.
>
> Apache has both input a filters (work on the request before content
> generation) and output filters (work on generated content). As I am
> exploring the possibility to port some Apache modules that transform data in
> both directions in a proxy-setup to Nginx, I am wondering whether Nginx has
> input filters as well. What I have read about Nginx modules seem to indicate
> that it does not. Is that correct?
>
> I am aware that I could hack something into the proxy module, but I would
> like to avoid that approach.

Depending on what you are trying to do, either phase handlers or
request body filters might work for you.

If they won't, you are probably looking for either proxy-level
modifications with proxy module configuration options (such as
proxy_set_header and proxy_set_body), or for a proxy-like module
which will do appropriate modifications.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Input filters in Nginx?

j94305
Maxim Dounin Wrote:
-------------------------------------------------------
[...]
>
> Depending on what you are trying to do, either phase handlers or
> request body filters might work for you.

Just working on the body will not do it. A phase handler,
basically what Apache offers with its "hooks" from what I can
see, looks promising though.

> If they won't, you are probably looking for either proxy-level
> modifications with proxy module configuration options (such as
> proxy_set_header and proxy_set_body), or for a proxy-like module
> which will do appropriate modifications.

I do want to avoid writing my on proxy-like module or modifying an
existing one. I do understand this is a possibility, but the people
I am looking at this for will want to keep the functionality separate
from the actual proxying.

Thanks for the pointer to the phase handlers!

Regards,
Arno

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286038,286060#msg-286060

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx