Skip to content

Conversation

@vncloudsco
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 9, 2025 08:50
Copy link

Copilot AI left a 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)}
Copy link

Copilot AI Oct 9, 2025

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.

Suggested change
${this.generateProxyHeaders(domain)}
${this.generateProxyHeaders()}

Copilot uses AI. Check for mistakes.
vncloudsco and others added 5 commits October 9, 2025 15:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2025

@vncloudsco vncloudsco merged commit 0dd6c5d into main Oct 9, 2025
2 of 3 checks passed
@vncloudsco vncloudsco deleted the feature_real_ip branch October 9, 2025 10:46
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.

2 participants