summaryrefslogtreecommitdiff
path: root/internal/debug
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2022-07-18 15:38:46 +0200
committerValery Piashchynski <[email protected]>2022-07-18 15:38:46 +0200
commit22784d994d360a3ed90e9cb49104d23414242ae8 (patch)
treedc830cc93ad3cce1e89eaedf9d85cb9f640853f9 /internal/debug
parentdc7a4c54357ae5d99f5251bdc40d2bf0adc9e2d4 (diff)
debug server: add readheadertimeout
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal/debug')
-rw-r--r--internal/debug/server.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/debug/server.go b/internal/debug/server.go
index c07a4549..6a758055 100644
--- a/internal/debug/server.go
+++ b/internal/debug/server.go
@@ -4,6 +4,7 @@ import (
"context"
"net/http"
"net/http/pprof"
+ "time"
)
// Server is a HTTP server for debugging.
@@ -21,7 +22,10 @@ func NewServer() Server {
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
- return Server{srv: &http.Server{Handler: mux}}
+ return Server{srv: &http.Server{
+ ReadHeaderTimeout: time.Minute * 10,
+ Handler: mux,
+ }}
}
// Start debug server.