Update server

This commit is contained in:
Milan Nikolic
2025-06-15 08:34:19 +02:00
parent bf647116a3
commit d84884f26b
2 changed files with 7 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"net"
"net/http"
"time"
"github.com/abbot/go-http-auth"
@@ -63,7 +64,10 @@ func (s *Server) ListenAndServe() error {
http.Handle("/", newAuthHandler(handlers.NewIndex(), basic))
srv := &http.Server{}
srv := &http.Server{
ReadTimeout: 5 * time.Second,
WriteTimeout: 5 * time.Second,
}
listener, err := net.Listen("tcp", s.Bind)
if err != nil {