aboutsummaryrefslogtreecommitdiff
path: root/src/vmod-tbf.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/vmod-tbf.3')
-rw-r--r--src/vmod-tbf.315
1 files changed, 12 insertions, 3 deletions
diff --git a/src/vmod-tbf.3 b/src/vmod-tbf.3
index 6ab2f63..03d7daf 100644
--- a/src/vmod-tbf.3
+++ b/src/vmod-tbf.3
@@ -15,3 +15,3 @@
.\" along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
-.TH VMOD-TBF 1 "November 1, 2014" "VMOD-TBF" "User Reference"
+.TH VMOD-TBF 1 "November 13, 2014" "VMOD-TBF" "User Reference"
.SH NAME
@@ -80,3 +80,3 @@ sub vcl_recv {
if (!tbf.rate("ip:" + client.ip, 1, 0.1s, 20)) {
- error 429 "Request rate exceeded."
+ error(429, "Request rate exceeded");
}
@@ -89,2 +89,11 @@ second (or longer) period of inactivity.
.PP
+For VCL 4.0, replace
+.EX
+ error(429, "Request rate exceeded");
+.EE
+with
+.EX
+ return(synth(429, "Request rate exceeded"));
+.EE
+.PP
The \fBtbf.check\fR function provides a higher-level interface. Its
@@ -106,3 +115,3 @@ sub vcl_recv {
if (!tbf.check(client.ip, "10.5 req/1s")) {
- error 429 "Request rate exceeded."
+ error(429, "Request rate exceeded");
}

Return to:

Send suggestions and report system problems to the System administrator.