Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-28760

Varnish xkey header using wrong separator

    XMLWordPrintable

    Details

      Description

      Hi,

      In the xkey vmod documentation, keys in the pages headers must be separated by spaces and not comma.

      https://github.com/varnish/varnish-modules/blob/master/docs/vmod_xkey.rst

      "Alternatively you may instead use a single header with space separated values like xkey: 8155054 166412 234323."

      So when varnish associate the keys to the pages, instead of "content-249" we have "content-249,"

      eZPlatform is not able to purge the keys when a content is modified in BO.

      You must change the EzSystems\PlatformHttpCacheBundle\Handler\TagHandler class :

          public function addTagHeaders(Response $response, array $tags)
          {
              $tagsList = $response->headers->get($this->tagsHeader);
              $tagsList .= ' ' . implode(" ", $tags);
              $response->headers->set($this->tagsHeader, $tagsList, true);
          }
      

      Regards,
      Dominique

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dvasconc Dominique De Vasconcelos
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: