Skip to content

Commit

Permalink
[YUNIKORN-2182] Set ReadHeaderTimeout in http server (apache#872)
Browse files Browse the repository at this point in the history
Closes: apache#872

Signed-off-by: Chia-Ping Tsai <[email protected]>
  • Loading branch information
0lai0 authored and chia7712 committed Jul 8, 2024
1 parent b337896 commit a5e8750
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/admissioncontroller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"os"
"os/signal"
"syscall"
"time"

"go.uber.org/zap"

Expand Down Expand Up @@ -160,7 +161,8 @@ func (wh *WebHook) Startup(certs *tls.Certificate) {
CipherSuites: wh.getCipherSuites(), // limit cipher suite to secure ones
Certificates: []tls.Certificate{*certs},
},
Handler: mux,
Handler: mux,
ReadHeaderTimeout: 10 * time.Second,
}

go func() {
Expand Down

0 comments on commit a5e8750

Please sign in to comment.