mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 13:00:19 +00:00
5762da3e91
updating go dependency to latest kubernetes released version i.e v1.23.0 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
17 lines
363 B
Go
17 lines
363 B
Go
package httpserver
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// New returns a new server with sane defaults.
|
|
func New(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,
|
|
}
|
|
}
|