lua-nginx-module
lua-nginx-module copied to clipboard
feature: add FFI function for balancer.disable_ssl
I hereby granted the copyright of the changes in this pull request to the authors of this lua-nginx-module project.
Dynamically downgrade to HTTP to upstream based on SNI.
server {
listen 1984;
server_name *.test.com;
location / {
proxy_pass https://backend;
}
}
upstream backend {
server 127.0.0.1;
balancer_by_lua_block {
local b = require "ngx.balancer"
if ngx.ctx.host == 'a.test.com' then
b.disable_ssl()
b.set_current_peer("127.0.0.11", 80)
end
b.set_current_peer("127.0.0.11", 443)
}
}
@vislee Thanks for your PR, could you help to add some test cases?
@vislee Thanks for your PR, could you help to add some test cases?
@rainingmaster The test case in lua-resty-core
repository, ngx_http_lua_ffi_balancer_get_last_failure
is also absent, I don't know how to add it. :(
@vislee Thanks for your PR, could you help to add some test cases?
@rainingmaster The test case in
lua-resty-core
repository,ngx_http_lua_ffi_balancer_get_last_failure
is also absent, I don't know how to add it. :(
OK, that is fair, we can discuss in the related PR
This pull request is now in conflict :(