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)

    Details

    • Type: Bug Bug
    • Status: InputQ
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.5.1
    • Fix Version/s: Customer request
    • Component/s: None
    • Labels:
    • Environment:

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            S├ębastien Morel
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: