fix security - health endpoint will now properly handle timeouts
Some checks failed
PR Build / Test (pull_request) Failing after 2m42s
PR Build / Build_Image (pull_request) Successful in 1m24s

This commit is contained in:
Julian Haseleu
2025-10-09 14:36:27 +00:00
parent 89f0d5e6e7
commit 00708eef30

View File

@@ -37,7 +37,7 @@ func (hs *HealthServer) Start() {
r := mux.NewRouter()
r.Use(mux.CORSMethodMiddleware(r))
r.HandleFunc("/health", hs.sendHealth).Methods(http.MethodGet)
server := &http.Server{
Addr: "0.0.0.0:8080",
Handler: r,
@@ -45,7 +45,7 @@ func (hs *HealthServer) Start() {
WriteTimeout: 15 * time.Second,
IdleTimeout: 60 * time.Second,
}
err := server.ListenAndServe()
if err != nil {
log.WithFields(log.Fields{