Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cookies for pass' parsing query string, causes Plone theme editor to break #42

Closed
instification opened this issue Aug 29, 2017 · 1 comment

Comments

@instification
Copy link
Member

Problem

The default implementation of the recipe creates a 'cookies for pass' section that strips session coookies etc for urls that end in js, css and kss

/* cookies for pass */
    if (req.http.Cookie && req.http.Cookie ~ "__ac(|_(name|password|persistent))=") {
        if (req.url ~ "\.(js|css|kss)") {
            unset req.http.cookie;
            return(pipe);
        }
        return(pass);
    }

However, req.url includes the query string.

The Plone theme editor opens css files using the following xhr request:

/@@plone.resourceeditor.filemanager-actions?action=getFile&path=%2Fstylesheets%2Ffonts.css

Varnish is stripping the cookie and therefore Plone redirects to the require_login page, causing the css to open without any contents in the theme editor ide.

Possible solutions

@mauritsvanrees
Copy link
Member

The PR got merged, so I close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants