fix security issues
This commit is contained in:
6
main.go
6
main.go
@@ -7,6 +7,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/cors"
|
||||
@@ -89,8 +90,9 @@ func main() {
|
||||
|
||||
router.Mount("/v1", v1Router)
|
||||
srv := &http.Server{
|
||||
Addr: ":" + port,
|
||||
Handler: router,
|
||||
Addr: ":" + port,
|
||||
Handler: router,
|
||||
ReadHeaderTimeout: time.Second * 30,
|
||||
}
|
||||
|
||||
log.Printf("Serving on port: %s\n", port)
|
||||
|
||||
Reference in New Issue
Block a user