chore: set ReadHeaderTimeout to stop slowloris attacks
@@ -92,6 +92,7 @@ var CmdServer = &cobra.Command{
func startServerGracefully(listener net.Listener, handler http.Handler) error {
srv := &http.Server{
Handler: handler,
+ ReadHeaderTimeout: 10 * time.Second, // Prevent Slowloris attack
}
quit := make(chan os.Signal, 1)
