Fix G108 (CWE-200) and G114 (CWE-676)

This commit is contained in:
Alexander Gorenkov
2023-01-25 13:24:08 +04:00
committed by Ron Evans
parent 213b6e75c6
commit 4bdbfe3719

View File

@@ -20,8 +20,7 @@ import (
"log"
"net/http"
"os"
_ "net/http/pprof"
"time"
"github.com/hybridgroup/mjpeg"
"gocv.io/x/gocv"
@@ -62,7 +61,14 @@ func main() {
// start http server
http.Handle("/", stream)
log.Fatal(http.ListenAndServe(host, nil))
server := &http.Server{
Addr: host,
ReadTimeout: 60 * time.Second,
WriteTimeout: 60 * time.Second,
}
log.Fatal(server.ListenAndServe())
}
func mjpegCapture() {