mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-18 04:33:56 +00:00
add read header timeout to http servers
This commit is contained in:
+3
-2
@@ -53,8 +53,9 @@ func (as *ApiServer) Start(config config.ApiConfig) {
|
||||
as.serverMu.Lock()
|
||||
defer as.serverMu.Unlock()
|
||||
as.server = &http.Server{
|
||||
Addr: fmt.Sprintf(":%d", as.config.Port),
|
||||
Handler: mux,
|
||||
Addr: fmt.Sprintf(":%d", as.config.Port),
|
||||
ReadHeaderTimeout: 5 * time.Second,
|
||||
Handler: mux,
|
||||
}
|
||||
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user