As you’re aware, we don’t provide tech support for cloudflare fronted sites: [Support Guide] What problems could occur when using Cloudflare in front of Netlify?
This is not a cloudflare issue, so I’ll speak to this as though cloudflare was not involved.
To start with, we don’t provide the IP in a way you can manipulate using the headers functionality; it’s not available AT BUILD TIME which is when you must configure headers. This is in essence a “static” configuration for headers - there is no dynamic “variable substitution” even if we did have that available as a variable.
However, the IP is available in the HTTP headers. While we do reserve the right to change this implementation, you can currently and for the immediate future at least, use the X-Bb-IP
header, as shown in this screenshot (generated by testing a proxy route via requestbin.com):
Not sure if your setup can use it, but it’s what’s available, and we don’t intend to make anything else available in the foreseeable future for normal proxy’d requests such as you’re describing.