Updated deps, go.19 migration, nginx template work

This commit is contained in:
Jamie Curnow
2022-11-08 10:03:45 +10:00
parent 8d37f5df8d
commit c00b690ed3
23 changed files with 375 additions and 376 deletions

View File

@ -2,7 +2,7 @@ package middleware
import (
"context"
"io/ioutil"
"io"
"net/http"
c "npm/internal/api/context"
@ -15,7 +15,7 @@ func BodyContext() func(http.Handler) http.Handler {
// Grab the Body Data
var body []byte
if r.Body != nil {
body, _ = ioutil.ReadAll(r.Body)
body, _ = io.ReadAll(r.Body)
}
// Add it to the context
ctx := r.Context()

View File

@ -38,12 +38,6 @@ var headersAllowedByCORS = []string{
"User-Agent",
"Cache-Control",
"Accept-Encoding",
"X-Jumbo-AppKey",
"X-Jumbo-SKey",
"X-Jumbo-SV",
"X-Jumbo-Timestamp",
"X-Jumbo-Version",
"X-Jumbo-Customer-Id",
}
// Cors handles cors headers