Skip to content

Commit

Permalink
test: remove timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
andygeiss committed Dec 24, 2024
1 parent 77edf21 commit e79e4d6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions security/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"net/http"
"os"
"time"

"golang.org/x/crypto/acme"
"golang.org/x/crypto/acme/autocert"
Expand Down Expand Up @@ -66,13 +65,8 @@ func NewServer(mux *http.ServeMux, domains ...string) *http.Server {
port = "443"
}
return &http.Server{
Addr: fmt.Sprintf(":%s", port),
Handler: mux,
IdleTimeout: 5 * time.Second,
MaxHeaderBytes: 1 << 20, // Maximum size of request headers (1 MiB).
ReadHeaderTimeout: 5 * time.Second,
ReadTimeout: 5 * time.Second,
TLSConfig: tlsConfig(domains...),
WriteTimeout: 5 * time.Second,
Addr: fmt.Sprintf(":%s", port),
Handler: mux,
MaxHeaderBytes: 1 << 20, // Maximum size of request headers (1 MiB).
}
}

0 comments on commit e79e4d6

Please sign in to comment.