fix timeing
All checks were successful
CloudSave/pipeline/head This commit looks good
CloudSave/pipeline/pr-main This commit looks good

This commit is contained in:
2025-09-07 01:50:41 +02:00
parent ddcfe2a698
commit 5ba8642904
2 changed files with 3 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ func NewServer(documentRoot string, srv *data.Service, creds map[string]string,
s.Server = &http.Server{
Addr: fmt.Sprintf(":%d", port),
Handler: router,
ReadHeaderTimeout: 2,
ReadHeaderTimeout: 2 * time.Second,
}
return s
}

View File

@@ -13,6 +13,7 @@ import (
"runtime"
"slices"
"sync"
"time"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
@@ -107,7 +108,7 @@ func NewServer(c config.Configuration) *HTTPServer {
s.Server = &http.Server{
Addr: fmt.Sprintf(":%d", c.Server.Port),
Handler: router,
ReadHeaderTimeout: 2,
ReadHeaderTimeout: 2 * time.Second,
}
return s
}