mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 08:40:20 +00:00
Add persisted online sessions, configurable retention and online history statistics with lifecycle, recovery, timezone and concurrency regression coverage. Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
15 lines
411 B
Go
15 lines
411 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
const dashboardReadHeaderTimeout = 5 * time.Second
|
|
|
|
func newDashboardHTTPServer(handler http.Handler) *http.Server {
|
|
// ReadHeaderTimeout protects incomplete HTTP/1 requests and is cleared after
|
|
// headers. Unlike ReadTimeout it does not impose a lifetime on HTTP/2 streams.
|
|
return &http.Server{Handler: handler, ReadHeaderTimeout: dashboardReadHeaderTimeout}
|
|
}
|