Fix config init

This commit is contained in:
Jonas Kaninda
2024-11-14 18:32:25 +01:00
parent 0905a41941
commit 5e66a634f2
6 changed files with 12 additions and 103 deletions

View File

@@ -20,7 +20,6 @@ package pkg
import (
"context"
"github.com/gorilla/mux"
errorinterceptor "github.com/jkaninda/goma-gateway/pkg/errorinterceptor"
"time"
)
@@ -162,12 +161,10 @@ type Route struct {
//
// It will not match the backend route
DisableHostFording bool `yaml:"disableHostFording"`
// InterceptErrors holds the status codes to intercept the error from backend
InterceptErrors []int `yaml:"interceptErrors"`
// BlockCommonExploits enable, disable block common exploits
BlockCommonExploits bool `yaml:"blockCommonExploits"`
// ErrorInterceptor intercepts backend errors based on the status codes and custom message
//
ErrorInterceptor errorinterceptor.ErrorInterceptor `yaml:"errorInterceptor"`
// Middlewares Defines route middleware from Middleware names
Middlewares []string `yaml:"middlewares"`
}
@@ -290,7 +287,7 @@ type Health struct {
HealthyStatuses []int
}
type Redis struct {
// Addr redis hostname and post number :
// Addr redis hostname and port number :
Addr string `yaml:"addr"`
Password string `yaml:"password"`
}