Hello!
2014-07-02 1:34 GMT-07:00 刘泽航:
> 关于nginx_lua的主要问题就是我想询问一下:
> 能不能在大牛你配置lua当中读取用户发送给nginx的HTTP请求的head然后更改。
请参见 ngx_lua 的 ngx.req.get_headers() 和 ngx.req.set_header() 接口:
https://github.com/openresty/lua-nginx-module#ngxreqget_headers
https://github.com/openresty/lua-nginx-module#ngxreqset_header
建议通读 ngx_lua 模块的官方手册(https://github.com/openresty/lua-nginx-module#readme
),以节约你我的时间 :)
> 再发送到指定IP端口,获取返回数据,返回给用户。
>
同时参考下面这个动态转发的 demo:
http://openresty.org/#DynamicRoutingBasedOnRedis
> 大牛,打扰了,希望有时间能回复一下。
建议加入 openresty 中文邮件列表并总是在那里讨论这样的问题(这样你也可能更快地得到更多人的回复)。见
https://groups.google.com/group/openresty
同时抄送给该列表。
Best regards,
-agentzh