X-Forwarded-For and CF-IPCountry are empty sporadically

Hello,
We use the headers in our website to direct customers to the correct portal for their country. X-Forwarded-For IP and CF-IPCountry and they come through empty sometimes. Since Friday Feb 4, 2022. they have been empty about 50% of the time. I’ve opened a support ticket but so far there hasn’t been any movement on it. We created a debug page that just shows those values and hitting F5 they will sometimes show and some times not which causes customers to end up on the wrong portal. we have 8 domains/websites having this same issue, some are worse than others with one of them not showing CF-IPCountry at all.
Has anyone ever seen anything like this?

Maybe an idea to share that debug page :wink:

May I make a bold assumption? You are not proxying straight from Cloudflare to your server, there are some proxies in-between, right?

Cloudflare >> azure cloud service website.
So, I believe we found the issue. Sometimes the headers values come in in lower case, and some times they are in camel case. I’m not sure exactly what is doing this and why it started on Friday.

CF-IPCountry:
US
X-Forwarded-For:
50.x.x.x
CF-RAY:
6da5b828cc8c18f6-EWR

cf-ipcountry:
US
x-forwarded-for:
50.x.x.x
cf-ray:
6da5b9040a1518f6-EWR

Did you check if these requests came on different HTTP versions? Generally, though, HTTP headers are case-insensitive.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.