nginx和proxy_pass - 发送连接:关闭标头

nor*_*gon 5 http nginx

nginx似乎正在替换Connection: close上游发送的标头,并将其替换为Connection: keep-alive标头.有什么方法可以覆盖它吗?

http {
  upstream main {
    server 127.0.0.1:8000;
  }
  server {
    listen 443;
    ssl on;
    ssl_certificate server.crt;
    ssl_certificate_key server.key;
    location / {
      proxy_pass http://main;
    }
    location /find {
      proxy_pass http://main;
      proxy_buffering off;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

nor*_*gon 4

设置keepalive_requests 0;说服 nginx 发送Connection: close.