Skip to content

Commit 6ea9dc7

Browse files
committed
move varnish to docs; convert to reStructuredText
1 parent 2db3f84 commit 6ea9dc7

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

docs/varnish.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
If specified, the ``VARNISH_BASE`` configuration option is used is
2+
used to invalidate varnish's cache when necessary. This should be the
3+
URL of the varnish instance; see `config.yaml.example
4+
<config.yaml.example>`_.
5+
6+
This depends on a varnish configuration that processes ``BAN``
7+
requests over HTTP:
8+
9+
.. code:: vcl
10+
11+
acl purge {
12+
"localhost";
13+
}
14+
15+
sub vcl_recv {
16+
if (req.method == "BAN") {
17+
if (!client.ip ~ purge) {
18+
return(synth(405, "Not allowed."));
19+
}
20+
21+
ban("req.http.host == " + req.http.host +
22+
" && req.url ~ " + req.url);
23+
24+
return(synth(200, "Ban added."));
25+
}
26+
}
27+
28+
Enjoy.

varnish.md

-28
This file was deleted.

0 commit comments

Comments
 (0)