Skip to content

Commit

Permalink
Suppress gosec G107 warning, since the response body is ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Sep 18, 2023
1 parent c1366bc commit e6b2c0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var runCmd = &cobra.Command{
handler = mergedMetricsHandler(handler)
}
// Check if the metrics server is already running before registering the handler.
if _, err = http.Get(address); err != nil {
if _, err = http.Get(address); err != nil { //nolint:gosec
http.Handle(metricsConfig.Path, gziphandler.GzipHandler(handler))
} else {
logger.Warn().Msg("Metrics server is already running, consider changing the port")
Expand Down

0 comments on commit e6b2c0d

Please sign in to comment.