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

Varnish Purge FAILS in SiteAccess Matching Host (eZ Platform Cloud and prob other env)

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • Customer request
    • 2.5.1
    • None
    • all

    Description

      Hello,

      Varnish purge is not working in SiteAccess Host Matching on eZ Platform Cloud.
      https://github.com/ezsystems/ezplatform-http-cache/blob/master/src/PurgeClient/VarnishPurgeClient.php#L56

      empty($_SERVER['SERVER_NAME'])

      is not empty and contains the "Secured" SiteAccess (admin) host.

      Then when you call the purge you've got:

      curl https://siteaccess-admin.master-ezp2-wo-bridge-xxxxxx.eu-2.platformsh.site -XPURGE --header "x-invalidate-token: xxxxx" --header "key: xxxx_location-185148"
      <!DOCTYPE html>
      <html>
          <head>
              <meta charset="UTF-8" />
              <meta http-equiv="refresh" content="0;url=https://siteaccess-admin.master-ezp2-wo-bridge-xxxxxx.eu-2.platformsh.site/login" />
      
              <title>Redirecting to https://siteaccess-admin.master-ezp2-wo-bridge-xxxxxx.eu-2.platformsh.site/login</title>
          </head>
          <body>
              Redirecting to <a href="https://siteaccess-admin.master-ezp2-wo-bridge-xxxxxx.eu-2.platformsh.site/login/login">https://siteaccess-admin.master-ezp2-wo-bridge-xxxxxx.eu-2.platformsh.site/login</a>.
          </body>
      </html>

      We fixed the issue by adding this block in our security.yaml

            _ez_http_invalidatetoken:
                  pattern: /_ez_http_invalidatetoken
                  security: false
      

      We are not saying that is the best way to fix it, but that is at least enough information for you to do it

      Thanks, @Florian Alexandre to help to tackle this one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            2bfcc1b1-0b8e-4fb5-9c24-c434957abb69@accounts.ibexa.co Sébastien Morel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: