-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
varnishtest "Test querymodifier vmod for all params exclusion" | ||
|
||
server s1 { | ||
rxreq | ||
txresp -body "OK1" | ||
expect req.url == "/feed/" | ||
} -start | ||
|
||
varnish v1 -vcl+backend { | ||
import std; | ||
import querymodifier; | ||
|
||
sub vcl_recv { | ||
std.syslog(180, "querymodifier before: " + req.url); | ||
set req.url = querymodifier.excludeallparams(url=req.url); | ||
std.syslog(180, "querymodifier after: " + req.url); | ||
} | ||
} -start | ||
|
||
client c1 { | ||
txreq -url "/feed/?id=1&d=2&another=3" | ||
rxresp | ||
expect resp.status == 200 | ||
} -run | ||
|
||
varnish v1 -expect n_object == 1 | ||
varnish v1 -expect cache_miss == 1 | ||
varnish v1 -expect cache_hit == 0 |