Skip to content

Commit

Permalink
add default MaxRequestSize for REST
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesign committed Jan 29, 2025
1 parent d9b011a commit 6540b31
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/access/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"os"

"github.com/onflow/flow-go/engine/access/rest"
"github.com/onflow/flow-go/engine/access/rest/common"
"github.com/onflow/flow-go/engine/access/rest/router"
"github.com/onflow/flow-go/engine/access/rest/websockets"
"github.com/onflow/flow-go/engine/access/state_stream"
Expand Down Expand Up @@ -111,10 +112,11 @@ func NewRestServer(logger *zerolog.Logger, blockchain *emulator.Blockchain, adap
srv, err := rest.NewServer(
adapter,
rest.Config{
ListenAddress: fmt.Sprintf("%s:3333", host),
WriteTimeout: rest.DefaultWriteTimeout,
ReadTimeout: rest.DefaultReadTimeout,
IdleTimeout: rest.DefaultIdleTimeout,
ListenAddress: fmt.Sprintf("%s:3333", host),
WriteTimeout: rest.DefaultWriteTimeout,
ReadTimeout: rest.DefaultReadTimeout,
IdleTimeout: rest.DefaultIdleTimeout,
MaxRequestSize: common.DefaultMaxRequestSize,
},
debugLogger,
chain,
Expand Down

0 comments on commit 6540b31

Please sign in to comment.