August 19, 2015 · Varnish Nginx

Remove Varnish Headers

A quick tidbit which is great from a security point of view is to remove the versions of software you are running. If you use varnish this is easy to do. this guide is for Varnish 4.0. Edit your vanish default.vcl file with your favouite editor, I prefer Nano:

sudo nano /etc/varnish/default.vcl

Find the sub vcl_deliver stanza, usually at the end of the file and insert:

unset resp.http.X-Varnish; unset resp.http.Server; unset resp.http.Via; unset resp.http.Link;

Save the file and then run:

sudo service varnish restart

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus