Skip to content

Commit

Permalink
Merge pull request #43 from collective/instification/theme-editor-bugfix
Browse files Browse the repository at this point in the history
Strip query string before testing which urls to strip cookies on
  • Loading branch information
jensens authored Sep 8, 2017
2 parents f1e1b20 + d43372f commit 2a9b138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changelog

- Fix to failing travis tests, ``bin/createcoverage`` tries to open browser.
[instification]
- Stripped query string before testing which urls to strip cookies on.
https://github.com/collective/plone.recipe.varnish/issues/42 [instification]


2.0a7 (2017-08-16)
Expand Down
3 changes: 2 additions & 1 deletion plone/recipe/varnish/templates/varnish4.vcl.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ sub vcl_recv {
/* cookies for pass */
{% for rule in cookiepass %}
{# this part need review #}
set req.http.UrlNoQs = regsub(req.url, "\?.*$", "");
if (req.http.Cookie && req.http.Cookie ~ "{{rule['match']}}") {
if (req.url ~ "{{rule['exclude']}}") {
if (req.http.UrlNoQs ~ "{{rule['exclude']}}") {
unset req.http.cookie;
return(pipe);
}
Expand Down

0 comments on commit 2a9b138

Please sign in to comment.