Commit 610b309c authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Pål Hermunn Johansen

Correct regexp in examples

Fixes #2380.
parent 1e09758e
......@@ -426,7 +426,7 @@ 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"::
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
=======
......
......@@ -145,7 +145,7 @@ To send flags to the PCRE engine, such as to do case insensitive matching, add
the flag within parens following a question mark, like this::
# If host is NOT example dot com..
if (req.http.host !~ "(?i)example.com$") {
if (req.http.host !~ "(?i)example\.com$") {
...
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment