• Resolved watchthepix

    (@watchthepix)


    I checked with Dreamhost and they said there’s PHP Sessions that are setting cookies and affecting Varnish. They said if there is a rule that I’d like to add, they can add it. Can you create a rule for this error below in order to have this fixed?

    Checking into the site after adding the configuration, it looks like
    there’s still PHP sessions that are setting cookies and affecting
    Varnish. I’ll provide another example of the cURL output to help.
    < Cache-Control: max-age=86400, s-maxage=21600, max-age=0, public
    Cache-Control: max-age=86400, s-maxage=21600, max-age=0, public
    < Set-Cookie: wfvt_1576562421=599244fbf03c8; expires=Tue, 15-Aug-2017
    01:18:59 GMT; Max-Age=1800; path=/; HttpOnly
    Set-Cookie: wfvt_1576562421=599244fbf03c8; expires=Tue, 15-Aug-2017
    01:18:59 GMT; Max-Age=1800; path=/; HttpOnly
    < Set-Cookie: gaia_woocommerce_items_count=0; path=/
    Set-Cookie: gaia_woocommerce_items_count=0; path=/
    < Set-Cookie: gaia_woocommerce_cart_total=0; path=/
    Set-Cookie: gaia_woocommerce_cart_total=0; path=/
    < Location: https://www.watchingpixels.com/
    Location: https://www.watchingpixels.com/

    The code they created for Woocommerce is below:

    sub vcl_recv
    {
    if (req.url ~ "^/(cart|my-account|checkout|addons)" || req.url ~
    "add-to-cart=" )
    {
    return (pass);
    }
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Can you create a rule for this error below in order to have this fixed?

    You mean can I INVENT the rule for you?

    Generally no. DreamHost DreamPress support should be able to do that for you, however, and if not, they can escalate to DreamPress Engineering for help. But the WP forums are only for help in the plugin, and this is actually not a plugin issue.

    And anyway this isn’t sessions. When I look at the cookies being set on your site, I see this:

    wfvt_2074847713=59c430e2d66ba; expires=Thu, 21-Sep-2017 22:06:34 GMT; Max-Age=1800; path=/; secure; HttpOnly, gaia_woocommerce_items_count=0; path=/, gaia_woocommerce_cart_total=%26%23x62f%3B.%26%23x625%3B0; path=/

    That first one is the issue.

    wfvt_2074847713

    That’s WordFence. It’s setting cookies on every page load for every visitor.

    https://docs.wordfence.com/en/Wordfence_options#Disable_Wordfence_Cookies

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Sessions preventing Varnish to cache’ is closed to new replies.