Fix linter errors

This commit is contained in:
Daniel 2022-09-22 14:35:58 +02:00
parent 3920412b4b
commit eda7a122db
2 changed files with 4 additions and 2 deletions

View file

@ -82,7 +82,7 @@ func startDatabaseAPI(w http.ResponseWriter, r *http.Request) {
if err != nil { if err != nil {
errMsg := fmt.Sprintf("could not upgrade: %s", err) errMsg := fmt.Sprintf("could not upgrade: %s", err)
log.Error(errMsg) log.Error(errMsg)
http.Error(w, errMsg, 400) http.Error(w, errMsg, http.StatusBadRequest)
return return
} }

View file

@ -23,7 +23,9 @@ var (
mainMux = mux.NewRouter() mainMux = mux.NewRouter()
// server is the main server. // server is the main server.
server = &http.Server{} server = &http.Server{
ReadHeaderTimeout: 10 * time.Second,
}
handlerLock sync.RWMutex handlerLock sync.RWMutex
allowedDevCORSOrigins = []string{ allowedDevCORSOrigins = []string{