feat(#733)Support nginx bandwidth control
This commit is contained in:
parent
36cf018a71
commit
890c57f2ca
6 changed files with 84 additions and 12 deletions
|
|
@ -88,4 +88,15 @@ type Backend struct {
|
|||
// WhitelistSourceRange allows limiting access to certain client addresses
|
||||
// http://nginx.org/en/docs/http/ngx_http_access_module.html
|
||||
WhitelistSourceRange []string `json:"whitelist-source-range,-"`
|
||||
|
||||
// Limits the rate of response transmission to a client.
|
||||
// The rate is specified in bytes per second. The zero value disables rate limiting.
|
||||
// The limit is set per a request, and so if a client simultaneously opens two connections,
|
||||
// the overall rate will be twice as much as the specified limit.
|
||||
// http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate
|
||||
LimitRate int `json:"limit-rate"`
|
||||
|
||||
// Sets the initial amount after which the further transmission of a response to a client will be rate limited.
|
||||
// http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after
|
||||
LimitRateAfter int `json:"limit-rate-after"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue