-
Notifications
You must be signed in to change notification settings - Fork 141
Fix: configure trust proxy via CIDR list #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Preview is available here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request aims to improve proxy trust configuration by using the proxy-addr library to compile CIDR lists for safer client IP resolution behind proxies, preventing IP spoofing from untrusted sources.
Changes:
- Added
@types/proxy-addrtype definitions to dependencies - Updated trust proxy configuration to parse comma-separated CIDR lists and compile them using
proxy-addr.compile() - Enhanced logging to show the effective trust proxy configuration
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| package.json | Added @types/proxy-addr to dependencies for TypeScript support |
| package-lock.json | Updated lockfile with @types/proxy-addr and promoted @types/node and undici-types from dev to production dependencies |
| backend/routes.ts | Refactored trust proxy configuration to parse CIDR list and use proxy-addr.compile() for compilation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Preview is available here: |
|
Something went wrong with PR preview build please check |
|
Preview is available here: |
|
Preview is available here: |
What
TRUST_PROXYCIDR list withproxy-addrfor safe proxy trust handling.@types/proxy-addrfor TypeScript support.Why