-
-
Save sbeam/7067beada0f0594d4d3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 123d2pKhY1JNsNsc0bzw4L_37.vcl 2014-10-03 08:22:28.000000000 -0400 | |
+++ 123d2pKhY1JNsNsc0bzw4L_38.vcl 2014-10-03 08:22:03.000000000 -0400 | |
@@ -421,14 +421,21 @@ | |
# Header rewrite Whitelist Querystring : 10 | |
- set req.url = regsuball(req.url, "(?:(?<=[?&])(?!_escaped_fragment_|brand|branch|type|min_msrp|max_msrp|_type|keywords|page|per_page|tags|name|order_by|adid|return_url|event|classifications|zip|website_ids)[^&]+?)(?:&|$)", ""); | |
+ set req.url = regsuball(req.url, "(^|[\\?&]+)([^&\\/=]+(?:(&|$))|(?!_escaped_fragment_|brand|branch|type|min_msrp|max_msrp|_type|keywords|page|per_page|tags|name|order_by|adid|return_url|event|classifications|zip|website_ids\\b)[^&\\/=]+=[^&]+)", "&"); | |
- # Header rewrite sweep up trailing pretzels and interros : 11 | |
+ # Header rewrite remove extra pretzels : 11 | |
- set req.url = regsuball(req.url, "[&?]+$", ""); | |
+ set req.url = regsuball(req.url, "&+", "&"); | |
+ | |
+ | |
+ | |
+ # Header rewrite sweep up trailing pretzels and interros : 12 | |
+ | |
+ | |
+ set req.url = regsub(req.url, "[&?]+$", ""); | |
@@ -447,6 +454,21 @@ | |
} | |
#end condition | |
+ # Request Condition: there is a pretzel but no interro in the url Prio: 10 | |
+ if( req.url ~ "&" && !(req.url ~ "\?") ) { | |
+ | |
+ | |
+ # Header rewrite ensure interro comes first : 13 | |
+ | |
+ | |
+ set req.url = regsub(req.url, "&", "?"); | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ } | |
+ #end condition | |
# Request Condition: Logged In Prio: 11 | |
if( req.http.Cookie ~ "_reviewed_token" ) { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment