Skip to content

Commit d70cbea

Browse files
committed
chore: handle trusted proxies config error
1 parent 50105e4 commit d70cbea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎internal/bootstrap/app_bootstrap.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ func (app *BootstrapApp) Setup() error {
191191
engine := gin.New()
192192

193193
if len(app.config.TrustedProxies) > 0 {
194-
engine.SetTrustedProxies(strings.Split(app.config.TrustedProxies, ","))
194+
err := engine.SetTrustedProxies(strings.Split(app.config.TrustedProxies, ","))
195+
196+
if err != nil {
197+
return fmt.Errorf("failed to set trusted proxies: %w", err)
198+
}
195199
}
196200

197201
if config.Version != "development" {

0 commit comments

Comments
 (0)