Hi, Alexks, I don't want to hide the header. My problem is that Nginx change the "Connection: close" header in the reponse from upstream server to "Connction: keep-alive" and send to client. I want to keep the original "Connection: close" header.
Thanks Liu Peng ----- 原始邮件 ----- 发件人:Aleksandar Lazic <[email protected]> 收件人:[email protected] 抄送人:nginx <[email protected]> 主题:Re:_回复:Re:_Issue_about_nginx_removing_the_header_"Connection"_in_HTTP_response? 日期:2017年03月03日 16点19分 Hi. then one directive upward. http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header Cheers aleks Am 03-03-2017 06:00, schrieb [email protected]: Hi, What I mention is the header in response from backend server. Your answer about proxy_set_header is the "Connection" header in request. Thanks Liu Peng ----- 原始邮件 ----- 发件人:Aleksandar Lazic <[email protected]> 收件人:[email protected] 抄送人:[email protected] 主题:Re: Issue about nginx removing the header "Connection" in HTTP response? 日期:2017年03月03日 06点25分 Hi. Am 01-03-2017 08:29, schrieb [email protected]: > Hi, nginx guy, > > In our system, for some special requests, the upstream server will > return a response which the header includes "Connection: Close". > According to HTTP protocol, "Connection" is one-hop header. > So, nginx will remove this header and the client can't do the business > logic correctly. > > How to handle this scenario? you mean something like this? http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header If the value of a header field is an empty string then this field will not be passed to a proxied server: proxy_set_header Connection ""; > Thanks > Liu Peng > _______________________________________________ > nginx mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
