wodby / varnish

Varnish docker container image
https://wodby.com/stacks/varnish
MIT License
59 stars 29 forks source link

Possible config issues #12

Closed pprishchepa closed 5 years ago

pprishchepa commented 5 years ago

I noticed possible issue in varnish config:

  1. https://github.com/wodby/varnish/blob/master/templates/defaults/vcl_recv.vcl.tmpl#L34

    "^[; ]+|[; ]+$"

    a regexp consists of 2 identical parts [; ]

  2. It seems cookies does not affect hash here, so this block looks useless. I tested with FooCookieName=BarValue cookie and it does not affect on cache hash (VARNISH_KEEP_ALL_COOKIES was not enabled).

csandanov commented 5 years ago

This means delete ; at the start and the end.

csandanov commented 5 years ago

We also use in Drupal preset and it's commented as:

   # 5. Remove all spaces and semi-colons from the beginning and end of the
   #    cookie string.