mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Fix gosec scan: G112 (CWE-400) Potential Slowloris Attack (#10872)
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/network"
|
||||
@@ -72,8 +73,9 @@ func New(opts ...Option) (*Proxy, error) {
|
||||
mux.Handle("/", p)
|
||||
addr := fmt.Sprintf("%s:%d", p.cfg.proxyHost, p.cfg.proxyPort)
|
||||
srv := &http.Server{
|
||||
Handler: mux,
|
||||
Addr: addr,
|
||||
Handler: mux,
|
||||
Addr: addr,
|
||||
ReadHeaderTimeout: time.Second,
|
||||
}
|
||||
p.address = addr
|
||||
p.srv = srv
|
||||
|
||||
Reference in New Issue
Block a user