Skip to content

Instantly share code, notes, and snippets.

@dcarley
Created October 1, 2015 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcarley/c27ace09531d2ef39d2b to your computer and use it in GitHub Desktop.
Save dcarley/c27ace09531d2ef39d2b to your computer and use it in GitHub Desktop.
Varnish ACL /32 test
diff --git a/mock_cdn_config/modules/varnish/templates/default.vcl.erb b/mock_cdn_config/modules/varnish/templates/default.vcl.erb
index 4dd5d5b..996953f 100644
--- a/mock_cdn_config/modules/varnish/templates/default.vcl.erb
+++ b/mock_cdn_config/modules/varnish/templates/default.vcl.erb
@@ -55,7 +55,7 @@ backend sick_force_grace {
# line-by-line, otherwise we'll have trouble maintaining parity.
acl purge {
- "192.168.0.1";
+ "192.168.0.1"/32;
}
sub vcl_recv {
➜ cdn-acceptance-tests git:(master) ✗ go test -edgeHost 172.16.20.10 -skipVerifyTLS -skipFailover -vendor fastly -run TestMiscRestrictPurgeRequests -v
2015/10/01 09:21:51 Confirming that CDN is healthy
2015/10/01 09:21:51 Started server on port 8080
2015/10/01 09:21:51 Checking health of origin...
2015/10/01 09:22:00 origin is up!
=== RUN TestMiscRestrictPurgeRequests
--- PASS: TestMiscRestrictPurgeRequests (0.01s)
PASS
ok _/Users/dcarley/projects/govuk/cdn-acceptance-tests 9.066s
➜ cdn-acceptance-tests git:(master) ✗ vagrant ssh -c 'varnishd -V'
varnishd (varnish-3.0.5 revision 1a89b1f)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2011 Varnish Software AS
Connection to 127.0.0.1 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment