lnd: add http header timeout to config

This commit is contained in:
Amin Bashiri
2023-10-10 13:21:04 -06:00
parent ad5cd9c8bb
commit 039e9effe7
3 changed files with 15 additions and 6 deletions

4
lnd.go
View File

@@ -214,7 +214,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, implCfg *ImplementationCfg,
pprofServer := &http.Server{
Addr: cfg.Profile,
Handler: pprofMux,
ReadHeaderTimeout: 5 * time.Second,
ReadHeaderTimeout: cfg.HTTPHeaderTimeout,
}
// Shut the server down when lnd is shutting down.
@@ -271,6 +271,8 @@ func Main(cfg *Config, lisCfg ListenerCfg, implCfg *ImplementationCfg,
LetsEncryptListen: cfg.LetsEncryptListen,
DisableRestTLS: cfg.DisableRestTLS,
HTTPHeaderTimeout: cfg.HTTPHeaderTimeout,
}
tlsManager := NewTLSManager(tlsManagerCfg)
serverOpts, restDialOpts, restListen, cleanUp,