Skip to content

try: ip fix for cloudflare#1235

Merged
MODSetter merged 1 commit intomainfrom
dev
Apr 16, 2026
Merged

try: ip fix for cloudflare#1235
MODSetter merged 1 commit intomainfrom
dev

Conversation

@MODSetter
Copy link
Copy Markdown
Owner

@MODSetter MODSetter commented Apr 16, 2026

  • Introduced AI File Sorting functionality to automatically organize documents into a smart folder hierarchy based on source, date, and topic.
  • Updated README.md to include the new feature.
  • Enhanced homepage components with new illustrations and descriptions for AI File Sorting.
  • Refactored rate limiting logic to extract real client IPs more accurately.

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR introduces a fix for accurately extracting real client IP addresses behind Cloudflare and other reverse proxies by prioritizing the CF-Connecting-IP header, followed by X-Real-IP and X-Forwarded-For. The logic is refactored into a dedicated get_real_client_ip function used by the rate limiter and anonymous chat routes. Additionally, the PR includes unrelated documentation and UI updates for a new "AI File Sorting" feature that organizes documents into smart folder hierarchies.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/app/rate_limiter.py
2 surfsense_backend/app/routes/anonymous_chat_routes.py
3 surfsense_backend/app/app.py
4 README.md
5 surfsense_web/components/homepage/features-bento-grid.tsx
6 surfsense_web/components/homepage/why-surfsense.tsx
⚠️ Inconsistent Changes Detected
File Path Warning
README.md Adds documentation for AI File Sorting feature, which is unrelated to the IP fix for Cloudflare mentioned in the PR title
surfsense_web/components/homepage/features-bento-grid.tsx Introduces new UI components and illustrations for AI File Sorting feature, which is unrelated to the IP extraction fix
surfsense_web/components/homepage/why-surfsense.tsx Adds AI File Sorting comparison row, which is unrelated to the IP address extraction improvements

Need help? Join our Discord

Analyze latest changes

- Introduced AI File Sorting functionality to automatically organize documents into a smart folder hierarchy based on source, date, and topic.
- Updated README.md to include the new feature.
- Enhanced homepage components with new illustrations and descriptions for AI File Sorting.
- Refactored rate limiting logic to extract real client IPs more accurately.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surf-sense-frontend Ready Ready Preview, Comment Apr 16, 2026 9:15am

Request Review

Copy link
Copy Markdown

@recurseml recurseml Bot left a comment

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on 99995c6..2cb30c6

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (6)

README.md
surfsense_backend/app/app.py
surfsense_backend/app/rate_limiter.py
surfsense_backend/app/routes/anonymous_chat_routes.py
surfsense_web/components/homepage/features-bento-grid.tsx
surfsense_web/components/homepage/why-surfsense.tsx

@MODSetter MODSetter merged commit 7d6c7c4 into main Apr 16, 2026
12 of 15 checks passed
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