Skip to content

Commit

Permalink
fix:bandwidth config
Browse files Browse the repository at this point in the history
  • Loading branch information
constwz committed May 11, 2023
1 parent 9125422 commit 476c356
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ var DefaultRateLimiterConfig = &localhttp.RateLimiterConfig{

var DefaultBandwidthLimiterConfig = &localhttp.BandwidthLimiterConfig{
Enable: false,
R: 100,
B: 1000,
}

// LoadConfig loads the config file from path
Expand Down
6 changes: 3 additions & 3 deletions config/subconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func (cfg *StorageProviderConfig) MakeGatewayConfig() (*gateway.GatewayConfig, e
HTTPLimitCfg: cfg.RateLimiter.HTTPLimitCfg,
}
gCfg.BandwidthLimitCfg = &localhttp.BandwidthLimiterConfig{
Enable: cfg.BandwidthLimiter.Enable,
R: cfg.BandwidthLimiter.R,
B: cfg.BandwidthLimiter.B,
Enable: false,
R: 100,
B: 1000,
}
}
return gCfg, nil
Expand Down

0 comments on commit 476c356

Please sign in to comment.