fix client IP handling behind proxies
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user