App Platform w/Rails App & Sentry.IO - Use Real Client IP Address
B Moran
If you want to use Sentry along with your Rails App on the App Platform, remember that Cloudflare sits in front of the App Platform by default -- the real client IP address is provided by the Do-Connecting-IP header. Make sure your rails config sets config.action_dispatch.trusted_proxies to the CloudFlare IP Proxy address ranges; you may want to set config.send_default_pii = true in your sentry.init. You may also have to monkeypatch the Sentry::Event.calculate_real_ip_from_rack(env) method to use "HTTP_DO_CONNECTING_IP" as a forwarded-for header.