[master] 84dc0ca Improve examples

Federico G. Schwindt fgsch at lodoss.net
Thu Apr 14 12:22:04 CEST 2016


commit 84dc0ca9d378203f406de8464f55acb30f2b4d94
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Wed Apr 13 23:45:07 2016 +0100

    Improve examples

diff --git a/doc/sphinx/reference/varnish-cli.rst b/doc/sphinx/reference/varnish-cli.rst
index 203ac60..210d3c8 100644
--- a/doc/sphinx/reference/varnish-cli.rst
+++ b/doc/sphinx/reference/varnish-cli.rst
@@ -321,16 +321,15 @@ secret file, and the challenge string.
 EXAMPLES
 ========
 
-Simple example: All requests where req.url exactly matches the string
-/news are banned from the cache::
+Ban all requests where req.url exactly matches the string /news::
 
-    req.url == "/news"
+    ban req.url == "/news"
 
-Example: Ban all documents where the serving host is "example.com"
-or "www.example.com", and where the Set-Cookie header received from
-the backend contains "USERID=1663"::
+Ban all documents where the serving host is "example.com" or
+"www.example.com", and where the Set-Cookie header received from the
+backend contains "USERID=1663"::
 
-    req.http.host ~ "^(?i)(www\.)example.com$" && obj.http.set-cookie ~ "USERID=1663"
+    ban req.http.host ~ "^(?i)(www\\.)example.com$" && obj.http.set-cookie ~ "USERID=1663"
 
 AUTHORS
 =======



More information about the varnish-commit mailing list