package manager import ( "net/http" "time" ) // TODO: look into possibly converting to gin // NewServer returns a new server with sane defaults. func NewServer(handler http.Handler) *http.Server { return &http.Server{ Handler: handler, MaxHeaderBytes: 1 << 20, IdleTimeout: 90 * time.Second, // matches http.DefaultTransport keep-alive timeout ReadHeaderTimeout: 32 * time.Second, } }