Skip to content

Commit

Permalink
Fixing gosec warning
Browse files Browse the repository at this point in the history
  • Loading branch information
PacoNelos committed Dec 28, 2023
1 parent 223b75c commit 666b312
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ func main() {
if coreConfig.DEV_MODE {
go func() {
core.logger.Info("Starting profiler on localhost:6060")
err := http.ListenAndServe(fmt.Sprintf("%s:6060", coreConfig.API_HOST), nil)
server := &http.Server{
Addr: fmt.Sprintf("%s:6060", coreConfig.API_HOST),
ReadHeaderTimeout: 3 * time.Second,
}
err := server.ListenAndServe()
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 666b312

Please # to comment.