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 -4
View File
@@ -10,7 +10,6 @@ import (
"syscall"
"time"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/geo-platform/tenant-api/internal/ops/app"
@@ -18,6 +17,7 @@ import (
"github.com/geo-platform/tenant-api/internal/ops/repository"
"github.com/geo-platform/tenant-api/internal/ops/transport"
sharedauth "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/observability"
"github.com/geo-platform/tenant-api/internal/shared/repository/postgres"
@@ -113,10 +113,10 @@ func main() {
}
}()
if cfg.Server.Mode == "release" {
gin.SetMode(gin.ReleaseMode)
engine, err := sharedbootstrap.NewEngine(cfg.Server)
if err != nil {
logger.Sugar().Fatalf("ops-api init http engine: %v", err)
}
engine := gin.New()
transport.RegisterRoutes(transport.Deps{
Engine: engine,