From b62b2932fec2a8378e7d2d826c79d53c6d613bd0 Mon Sep 17 00:00:00 2001 From: Stavros Date: Tue, 16 Sep 2025 15:14:36 +0300 Subject: [PATCH] fix: only set trusted proxies if config option is not empty --- internal/bootstrap/app_bootstrap.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/bootstrap/app_bootstrap.go b/internal/bootstrap/app_bootstrap.go index 5301a76..18364da 100644 --- a/internal/bootstrap/app_bootstrap.go +++ b/internal/bootstrap/app_bootstrap.go @@ -182,7 +182,10 @@ func (app *BootstrapApp) Setup() error { // Create engine engine := gin.New() - engine.SetTrustedProxies(strings.Split(app.Config.TrustedProxies, ",")) + + if len(app.Config.TrustedProxies) > 0 { + engine.SetTrustedProxies(strings.Split(app.Config.TrustedProxies, ",")) + } if config.Version != "development" { gin.SetMode(gin.ReleaseMode)