-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filter available? #213
Comments
Any solution to this? |
Openresty gives a lua API https://github.com/openresty/stream-lua-nginx-module/blob/master/README.md?plain=1#L82 which can get raw downstream in lua coroutine, So maybe it's a better way to meet your need. @toremick @MageekChiu |
Hi @oowl in njs i can do this like: function inject_string(s)
{
s.on('upstream', function(data, flags)
{
s.sendUpstream("My string\n");
s.off('upstream');
});
} and then use |
I have read njs doc. Yeah, it seems openresty can not inject some content in proxy, But openresty
Of course, this bypasses a lot of configurations in nginx, such as the upstream, but it is feasible in openresty. |
Thanks for the input, but it will not work very good i guess, since i need traffic both ways etc. I think |
is there anything like a filter in stream-lua-nginx-module?
like this:
https://nginx.org/en/docs/stream/ngx_stream_js_module.html#js_filter
in this filter we can do something with each packet.
thank you!
The text was updated successfully, but these errors were encountered: