ngx_http_proxy_connect_module icon indicating copy to clipboard operation
ngx_http_proxy_connect_module copied to clipboard

不支持自定义变量

Open test20200927 opened this issue 3 years ago • 1 comments

如下。在客户端请求的请求头加入自定义字段X-New-Header: two时,变量$var_2的值没有生效。 set $var_2 ''; if ( $http_x_new_header= "two" ) { set $var_2 2;}

test20200927 avatar Feb 15 '22 06:02 test20200927

这个模块实际是一个tcp代理。无法在交互(被代理的)数据中 检索或者插入(读、些)数据。

唯一能改变的只是第一次建立隧道时候那个CONNECT请求的应答数据,如果你想改这个可以参考,注意这里任何更改对后续实际代理数据传输没有影响:https://github.com/chobits/ngx_http_proxy_connect_module/blob/master/t/http_proxy_connect_lua.t#L90

chobits avatar Mar 26 '22 09:03 chobits