refactor: rework the way trusted proxies ip work#1007
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe router now records whether trusted proxies are configured, passes that state through ACL evaluation context, and changes IP allow/bypass rule outcomes when proxy configuration is absent. Tests cover both configured and unconfigured states. ChangesTrusted proxy ACL behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RouterBootstrap
participant proxyHandler
participant policyEngine
participant IPAccessRules
RouterBootstrap->>proxyHandler: Store TrustedProxiesConfigured
proxyHandler->>policyEngine: Evaluate ACLContext with trusted-proxy state
policyEngine->>IPAccessRules: Evaluate IP allow or bypass rule
IPAccessRules-->>policyEngine: Return allow or deny effect
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit
Bug Fixes
Tests