• Dridi Boukelmoune's avatar
    http: Configure the Via header with server identity · 58b15515
    Dridi Boukelmoune authored
    Change made to the Via header:
    
        -Via: 1.1 varnish (Varnish/x.y)
        +Via: 1.1 ${i_opt} (Varnish/x.y)
    
    It should actually better serve its purpose of informing about the hops
    a request (or in this case a response) went through. This is how Via is
    defined in HTTP:
    
        Via = #( received-protocol RWS received-by [ RWS comment ] )
    
    Using the server identity (which defaults to the server host name) is
    more accurate for the received-by field. We still advertise Varnish in
    the optional comment field, and hopefully that's what analytics services
    rely on to recognize a server as a Varnish instance.
    
    A bit of trivia, a proxy MAY add a Via entry to the response and MUST
    add one to a forwarded request: Varnish only adds the optional one.
    
    Refs rfc9110/7.6.3.
    Fixes #3794
    58b15515
cache.h 23.1 KB