Attila Fulop
Attila Fulop

Reputation: 7011

Varnish Via and X-Varnish headers: are they needed in production?

We have just deployed several varnish instances in production and I'm wondering whether is it ok to unset the Via: and X-Varnish: headers.

As far as I read Via is only an info header, while X-Varnish is for debugging, but I didn't find info about whether they're optional or necessary.

So is it safe to removed them like this?

sub vcl_deliver {
  unset resp.http.Via;
  unset resp.http.X-Varnish;
}

Upvotes: 2

Views: 1974

Answers (1)

Marcel Dumont
Marcel Dumont

Reputation: 1207

From a Varnish/Browser/End-user perspective they are both optional and can be removed.

Upvotes: 5

Related Questions