security fix: Uncontrolled resource consumption (Slowloris)
This commit is contained in:
parent
b3b102b2f4
commit
499e251796
5 changed files with 28 additions and 8 deletions
|
@ -52,8 +52,12 @@ func NewApp(htpasswd_file *string, restrict_to_ips *string, baseURL string, bind
|
|||
|
||||
func (app *App) Start() {
|
||||
app.srv = &http.Server{
|
||||
Addr: app.bind,
|
||||
Handler: app.router,
|
||||
Addr: app.bind,
|
||||
Handler: app.router,
|
||||
ReadHeaderTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
IdleTimeout: 30 * time.Second,
|
||||
}
|
||||
|
||||
log.Printf("Ready, listening on %s\n", app.bind)
|
||||
|
|
Reference in a new issue