Skip to content

Add TrustedProxies configuration to support proxy IPs in Gin#137

Merged
devld merged 2 commits intomasterfrom
code-vuln-bae86
Mar 11, 2026
Merged

Add TrustedProxies configuration to support proxy IPs in Gin#137
devld merged 2 commits intomasterfrom
code-vuln-bae86

Conversation

@devld
Copy link
Copy Markdown
Owner

@devld devld commented Mar 11, 2026

Note

Medium Risk
Touches request client-IP determination, which can affect logging and any IP-based controls (e.g., rate limiting) if misconfigured, though the default remains the safer “trust none” behavior.

Overview
Adds a new trusted-proxies config field (YAML trusted-proxies) and documents it in docs/config.yml for deployments behind reverse proxies.

Updates server initialization to apply gin.Engine.SetTrustedProxies from config (or explicitly disable trusting proxy headers when unset), ensuring ClientIP() behavior matches the configured proxy trust model.

Written by Cursor Bugbot for commit f127ae9. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Free Tier Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread server/server.go
Comment thread server/server.go
@devld devld merged commit b9fae7a into master Mar 11, 2026
4 checks passed
@devld devld deleted the code-vuln-bae86 branch April 12, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant