add goSec, go-lint, update actions #2

Merged
lerentis merged 4 commits from add-gosec-scan into main 2025-10-09 15:47:41 +00:00
Showing only changes of commit 89f0d5e6e7 - Show all commits

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"net/http"
"sync"
"time"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
@@ -36,7 +37,16 @@ func (hs *HealthServer) Start() {
r := mux.NewRouter()
r.Use(mux.CORSMethodMiddleware(r))
r.HandleFunc("/health", hs.sendHealth).Methods(http.MethodGet)
err := http.ListenAndServe("0.0.0.0:8080", r)
server := &http.Server{
Addr: "0.0.0.0:8080",
Handler: r,
ReadTimeout: 15 * time.Second,
WriteTimeout: 15 * time.Second,
IdleTimeout: 60 * time.Second,
}
err := server.ListenAndServe()
if err != nil {
log.WithFields(log.Fields{
"Caller": "HealthServer.Start",