Skip to content

Commit 535131e

Browse files
committed
add read header timeout to mitigate slowloris
1 parent a4bffde commit 535131e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dbos/admin_server.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ func newAdminServer(ctx *dbosContext, port int) *adminServer {
8989
})
9090

9191
server := &http.Server{
92-
Addr: fmt.Sprintf(":%d", port),
93-
Handler: mux,
92+
Addr: fmt.Sprintf(":%d", port),
93+
Handler: mux,
94+
ReadHeaderTimeout: 5 * time.Second,
9495
}
9596

9697
return &adminServer{

0 commit comments

Comments
 (0)