fix the gosec test and a make target for it
This commit is contained in:
parent
902c9dbee8
commit
f5d3ab4505
3 changed files with 13 additions and 5 deletions
|
|
@ -327,8 +327,10 @@ func registerProfiler() {
|
|||
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
||||
|
||||
server := &http.Server{
|
||||
Addr: fmt.Sprintf("127.0.0.1:%v", nginx.ProfilerPort),
|
||||
Handler: mux,
|
||||
Addr: fmt.Sprintf("127.0.0.1:%v", nginx.ProfilerPort),
|
||||
//G112 (CWE-400): Potential Slowloris Attack
|
||||
ReadHeaderTimeout: 10 * time.Second,
|
||||
Handler: mux,
|
||||
}
|
||||
klog.Fatal(server.ListenAndServe())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue