Merge pull request #6726 from afrouzMashaykhi/add-body-filter-by-lua

add body_filter_by_lua_block lua plugin to ingress-nginx
This commit is contained in:
Kubernetes Prow Robot 2021-01-06 16:55:45 -08:00 committed by GitHub
commit ff74d0ff33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -15,6 +15,7 @@ By defining functions with the following names, you can run your custom Lua code
- `init_worker`: useful for initializing some data per Nginx worker process - `init_worker`: useful for initializing some data per Nginx worker process
- `rewrite`: useful for modifying request, changing headers, redirection, dropping request, doing authentication etc - `rewrite`: useful for modifying request, changing headers, redirection, dropping request, doing authentication etc
- `header_filter`: this is called when backend response header is received, it is useful for modifying response headers - `header_filter`: this is called when backend response header is received, it is useful for modifying response headers
- `body_filter`: this is called when response body is received, it is useful for logging response body
- `log`: this is called when request processing is completed and a response is delivered to the client - `log`: this is called when request processing is completed and a response is delivered to the client
Check this [`hello_world`](https://github.com/kubernetes/ingress-nginx/tree/master/rootfs/etc/nginx/lua/plugins/hello_world) plugin as a simple example or refer to [OpenID Connect integration](https://github.com/ElvinEfendi/ingress-nginx-openidc/tree/master/rootfs/etc/nginx/lua/plugins/openidc) for more advanced usage. Check this [`hello_world`](https://github.com/kubernetes/ingress-nginx/tree/master/rootfs/etc/nginx/lua/plugins/hello_world) plugin as a simple example or refer to [OpenID Connect integration](https://github.com/ElvinEfendi/ingress-nginx-openidc/tree/master/rootfs/etc/nginx/lua/plugins/openidc) for more advanced usage.

View file

@ -1112,6 +1112,7 @@ stream {
} }
body_filter_by_lua_block { body_filter_by_lua_block {
plugins.run()
} }
log_by_lua_block { log_by_lua_block {