8000 Caching stops working after csrfcookie is set if there are other varying cookies (like GA cookies) · Issue #84 · coderedcorp/wagtail-cache · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Caching stops working after csrfcookie is set if there are other varying cookies (like GA cookies) #84
Open
@tjwalch

Description

@tjwalch

Problem
I have a site that uses Google Analytics so I get a lot of these crap cookies. Wagtail Cache's cookie chopping works well until a page on the site that sets the csrf cookie is visited. Now settings.CSRF_COOKIE_NAME cookie is in all requests which means that NO cookies are chopped and no pages are cached.

Solution
Strip all other cookies and build a cache key that only uses values for settings.CSRF_COOKIE_NAME and settings.SESSION_COOKIE_NAME (if these are present.)

Metadata

Metadata

35AD Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0