1

I am planning to limit user bandwidth. I came across post_action directive in core module and thinking if I can get response size served by nginx and send it to code using post_action.

Any ideas how can I do that?

2 Answers 2

1

nginx sets its $body_bytes_sent variable to the size of the HTTP response.

1
0

There's a built-in solution to limit user bandwith in the HttpCoreModule of nginx. Let's say for example that you want to limit bandwith to 20kB/s:

set $limit_rate 20k;
1
  • I want to limit bandwidth per user per month
    – Naveed
    Nov 29, 2012 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .