mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-28 19:40:28 +00:00
Fix linting problems
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/go-chi/jwtauth"
|
||||
)
|
||||
|
||||
// DecodeAuth ...
|
||||
// DecodeAuth decodes an auth header
|
||||
func DecodeAuth() func(http.Handler) http.Handler {
|
||||
privateKey, privateKeyParseErr := njwt.GetPrivateKey()
|
||||
if privateKeyParseErr != nil && privateKey == nil {
|
||||
|
@@ -46,7 +46,7 @@ var headersAllowedByCORS = []string{
|
||||
"X-Jumbo-Customer-Id",
|
||||
}
|
||||
|
||||
// Cors ...
|
||||
// Cors handles cors headers
|
||||
func Cors(routes chi.Router) func(http.Handler) http.Handler {
|
||||
return func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -66,7 +66,7 @@ func Cors(routes chi.Router) func(http.Handler) http.Handler {
|
||||
}
|
||||
}
|
||||
|
||||
// Options ...
|
||||
// Options handles options requests
|
||||
func Options(routes chi.Router) func(http.Handler) http.Handler {
|
||||
return func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/qri-io/jsonschema"
|
||||
)
|
||||
|
||||
// CheckRequestSchema ...
|
||||
// CheckRequestSchema checks the payload against schema
|
||||
func CheckRequestSchema(ctx context.Context, schemaData string, payload []byte) ([]jsonschema.KeyError, error) {
|
||||
// Create root schema
|
||||
rs := &jsonschema.Schema{}
|
||||
|
Reference in New Issue
Block a user