Fix potential Slowloris Attack because ReadHeaderTimeout was not configured (CWE-400)
This commit is contained in:
parent
c58c18f0b6
commit
a72a889442
|
@ -73,8 +73,9 @@ func NewAdmin(cfg *config.Options) Admin {
|
|||
|
||||
func (app *Admin) Start() {
|
||||
app.srv = &http.Server{
|
||||
Addr: app.cfg.AdminBind,
|
||||
Handler: app.router,
|
||||
Addr: app.cfg.AdminBind,
|
||||
Handler: app.router,
|
||||
ReadHeaderTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
log.Printf("Admin interface listening on %s\n", app.cfg.AdminBind)
|
||||
|
|
|
@ -72,8 +72,9 @@ func NewApp(cfg *config.Options) App {
|
|||
|
||||
func (app *App) Start() {
|
||||
app.srv = &http.Server{
|
||||
Addr: app.cfg.Bind,
|
||||
Handler: app.router,
|
||||
Addr: app.cfg.Bind,
|
||||
Handler: app.router,
|
||||
ReadHeaderTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
log.Printf("Public interface listening on %s\n", app.cfg.Bind)
|
||||
|
|
Loading…
Reference in New Issue