title: Is there any way to get Varnish switch from Connection: Keep-Alive to Close?
body: <p>I have Varnish 6 installed on Ubuntu in front of Apache2.4 as backend.</p>
  
  <p>I have tried to set it in sub <code>vcl_pipe</code>,  <code>vcl_backend_response</code>:</p>
  
  <pre><code>set bereq.http.Connection = "close";
  </code></pre>
  
  <p>I've tried to set  it in <code>vcl_recv</code> as:</p>
  
  <pre><code>req.http.Connection = "close";
  </code></pre>
  
  <p>I've tried to set it in <code>vcl_deliver</code> :</p>
  
  <pre><code>set resp.http.Connection = "Close";
  </code></pre>
  
  <p>None of it helped at all. Even though when I use varnishlog, I can see that the repose connection header was set to "Close, in fact when I get it in browser - the Connection is still set as "Keep-alive".</p>
  
  <p>Is there any possible way to manipulate connection response header in Varnish?
  P.S As a matter of fact - I do change the connection response header to "Close" in my back end framework, but Varnish wouldn't pass it through to the client, so I started to dig deeper and tried to change that in Varnish config, but it does not work, no matter what. The connection would always be "Keep-alive".</p>
  
  <p>Maybe I should try another Varnish version (4 or 5?).</p>
  
  <p>Any help would be appreciated. Thanks.</p>