File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2024 Blink Labs Software
1+ // Copyright 2025 Blink Labs Software
22//
33// Use of this source code is governed by an MIT-style
44// license that can be found in the LICENSE file or at
@@ -11,10 +11,12 @@ import (
1111 "fmt"
1212 "log/slog"
1313 "net/http"
14- _ "net/http/pprof"
1514 "os"
1615 "time"
1716
17+ // #nosec G108
18+ _ "net/http/pprof"
19+
1820 "github.com/prometheus/client_golang/prometheus/promhttp"
1921 "go.uber.org/automaxprocs/maxprocs"
2022
@@ -85,14 +87,15 @@ func main() {
8587 ),
8688 )
8789 go func () {
88- err := http .ListenAndServe (
89- fmt .Sprintf (
90+ debugger := & http.Server {
91+ Addr : fmt .Sprintf (
9092 "%s:%d" ,
9193 cfg .Debug .ListenAddress ,
9294 cfg .Debug .ListenPort ,
9395 ),
94- nil ,
95- )
96+ ReadHeaderTimeout : 60 * time .Second ,
97+ }
98+ err := debugger .ListenAndServe ()
9699 if err != nil {
97100 slog .Error (
98101 fmt .Sprintf ("failed to start debug listener: %s" , err ),
You can’t perform that action at this time.
0 commit comments