Skip to content

Commit

Permalink
Define ReadHeaderTimeout to 1 minute (as nginx default does)
Browse files Browse the repository at this point in the history
fixes #291
  • Loading branch information
m-messiah committed Jul 21, 2022
1 parent 5deff72 commit 84b003c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions virtualcluster/cmd/vn-agent/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"net/http"
"os"
"time"

"k8s.io/apiserver/pkg/server/healthz"

Expand Down Expand Up @@ -98,8 +99,9 @@ func Run(c *config.Config, serverOption *options.ServerOption, stopCh <-chan str
}

s := &http.Server{
Addr: fmt.Sprintf(":%d", serverOption.Port),
Handler: handler,
Addr: fmt.Sprintf(":%d", serverOption.Port),
Handler: handler,
ReadHeaderTimeout: time.Minute,
TLSConfig: &tls.Config{
ClientAuth: tls.RequestClientCert,
MinVersion: tls.VersionTLS12,
Expand Down

0 comments on commit 84b003c

Please sign in to comment.