fix client IP handling behind proxies
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/geo-platform/tenant-api/internal/shared/auditlog"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/auth"
|
||||
sharedbootstrap "github.com/geo-platform/tenant-api/internal/shared/bootstrap"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/cache"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/config"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/llm"
|
||||
@@ -148,10 +149,10 @@ func New(configPath string) (*App, error) {
|
||||
kolAssists := repository.NewKolAssistRepository(pool)
|
||||
kolPromptAsset := tenantapp.NewKolPromptAsset(objectStorageClient)
|
||||
|
||||
if cfg.Server.Mode == "release" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
engine, err := sharedbootstrap.NewEngine(cfg.Server)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("init http engine: %w", err)
|
||||
}
|
||||
engine := gin.New()
|
||||
|
||||
engine.Use(
|
||||
middleware.Recovery(logger),
|
||||
|
||||
Reference in New Issue
Block a user