-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Add Real IP configuration support for domains, including Cloudflare integration #35
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
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 PR implements Real IP configuration support for domains, allowing proper client IP detection when behind proxies like Cloudflare. The feature includes automatic fetching of Cloudflare IP ranges and support for custom CIDR configurations.
Key changes:
- Added Real IP configuration UI components with toggles for enabling real IP detection and Cloudflare integration
- Implemented Cloudflare IP service that fetches current IP ranges with fallback to hardcoded values
- Updated Nginx configuration generation to include real_ip directives when enabled
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| DomainDialog.tsx | Adds UI controls for Real IP configuration with enable toggle and Cloudflare option |
| nginx-config.service.ts | Generates Nginx real_ip directives and refactored proxy header handling |
| cloudflare-ips.service.ts | New service for fetching and caching Cloudflare IP ranges with fallback |
| schema.prisma | Adds database fields for Real IP configuration |
| *.dto.ts, *.types.ts | Updates data transfer objects and types to support Real IP config |
| domains.repository.ts | Database operations for Real IP configuration fields |
| domains.controller.ts | API endpoint updates to handle Real IP configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| error_log /var/log/nginx/${domain.name}_error.log warn; | ||
| location / { | ||
| ${this.generateProxyHeaders(domain)} |
Copilot
AI
Oct 9, 2025
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.
The proxy headers are being generated but the domain parameter is not used within generateProxyHeaders(). Consider removing the unused parameter or clarify why it's needed for future extensibility.
| ${this.generateProxyHeaders(domain)} | |
| ${this.generateProxyHeaders()} |
|



No description provided.