[nginx] limit_rate_after

洪志道 hongzhidao at gmail.com
Tue Feb 14 07:54:35 UTC 2017


Hi!

Dose nginx consider support setting variable about limit_rate_after?
We can limit rate after $n bytes received from upstream.

--- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300
+++ b/src/http/ngx_http_variables.c Tue Feb 07 05:15:51 2017 +0800
@@ -321,6 +321,11 @@
       offsetof(ngx_http_request_t, limit_rate),
       NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },

+    { ngx_string("limit_rate_after"), ngx_http_variable_request_set_size,
+      ngx_http_variable_request_get_size,
+      offsetof(ngx_http_request_t, limit_rate_after),
+      NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
+
     { ngx_string("connection"), NULL,
       ngx_http_variable_connection, 0, 0, 0 },


Thanks.
B.R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20170214/82ec8bee/attachment.html>


More information about the nginx-devel mailing list