Skip to content

Commit

Permalink
Update numProxies to 2 on the disperser (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc authored and jianoaix committed Nov 22, 2023
1 parent 180d027 commit 3aca427
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type RateBucketParams struct {

// GetClientAddress returns the client address from the context. If the header is not empty, it will
// take the ip address located at the `numProxies“ position from the end of the header. If the ip address cannot be
// found in the header, it will use the connection ip if `alloweDirectionConnection` is true. Otherwise, it will return
// found in the header, it will use the connection ip if `allowDirectConnectionFallback` is true. Otherwise, it will return
// an error.
func GetClientAddress(ctx context.Context, header string, numProxies int, allowDirectConnectionFallback bool) (string, error) {

Expand Down
2 changes: 1 addition & 1 deletion disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (s *DispersalServer) DisperseBlob(ctx context.Context, req *pb.DisperseBlob

blob := getBlobFromRequest(req)

origin, err := common.GetClientAddress(ctx, s.rateConfig.ClientIPHeader, 1, true)
origin, err := common.GetClientAddress(ctx, s.rateConfig.ClientIPHeader, 2, true)
if err != nil {
for _, param := range securityParams {
quorumId := string(uint8(param.GetQuorumId()))
Expand Down

0 comments on commit 3aca427

Please sign in to comment.