lua-upstream-nginx-module
lua-upstream-nginx-module copied to clipboard
New Feature: added ngx_http_lua_upstream_set_peer_addr()
Hi agentzh. This adds ngx_http_lua_upstream_set_peer_addr() to change upstream ip:port for https://github.com/openresty/lua-upstream-nginx-module/issues/10. I would appreciate it if you could run tests and merge this feature with your branch.
The syntax is similar to set_peer_down as follows: syntax: ok, err = upstream.set_peer_addr(upstream_name, is_backup, peer_id, addr_value) upstream.set_peer_addr("bar", false, 0, "10.10.10.10:80")
@vozlt Thanks for the patch. I'll look into this as soon as I can manage. Too busy at the moment. Sorry.