fix client IP handling behind proxies
Deployment Config CI / Deployment Config (push) Successful in 27s
Frontend CI / Frontend (push) Successful in 3m2s
Backend CI / Backend (push) Successful in 14m8s

This commit is contained in:
2026-05-05 23:01:25 +08:00
parent ffb7d179c6
commit 3c912949e4
20 changed files with 272 additions and 16 deletions
+4 -3
View File
@@ -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),