Skip to content

Conversation

@engine-labs-paul
Copy link

Summary

Refactored the nginx.conf for improved clarity and correct user IP forwarding in Render.com + Cloudflare setups, while maintaining endpoint proxying and optimizing for high concurrency.

Details

  • Reorganized nginx.conf for simplicity, clear comments, and best practices.
  • Explicitly added Cloudflare and Render.com trusted proxy IPs with explanations.
  • Switched to using X-Forwarded-For and recursive real IP extraction to handle multiple proxy hops correctly.
  • Used conditional map logic to always provide most accurate client IP for headers.
  • Moved common proxy_set_header lines to the server context for DRYness.
  • Maintained Mixpanel endpoint support for /lib.min.js, /lib.js, /decide, and / (catch-all).
  • Preserved and enhanced debug/diagnostic header logic.
  • Enabled high concurrency settings with worker and server tuning.
  • Created a .gitignore file for common log, OS, and editor files.

Warning: Task VM test is not passing, Engine will perform much better if you fix the setup

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