Skip to content

Update trusted IP ranges to use Cloudflare instead #37

@wonrax

Description

@wonrax

We moved from CloudFront to Cloudflare but haven't updated the trusted proxy IP ranges, this doesn't break or change the API behavior but causes it to emit warning logs every time IP extraction is used, for example:

{
  "cf_ip": "Some([REDACTED])", <- expected cloudfront ip, but it's actually cloudflare's
  "client_ip": "[REDACTED]",
  "filename": "api/src/real_ip.rs",
  "level": "WARN",
  "line_number": 80,
  "message": "Request from non-CloudFront proxy, using the untrusted client IP",
  "spans": "[{\"matched_path\":\"/blog/:slug/comments\",\"method\":\"POST\",\"name\":\"http_request\"}]",
  "target": "api::real_ip",
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions