location /version { proxy_pass http://xxx.com/version; } 后端 xxx.com/version 返回的是一个字串,我希望nginx先收到这个字串后再返回给客户端,请问是否可以实现?
当然可以,而且有多种方法,看你要怎么处理。 用 lua 扩展,参考 https://github.com/openresty/... 自己实现一个代理服务器,对接 nginx 和上游代理服务器。 开发 nginx 模块。
当然可以,而且有多种方法,看你要怎么处理。