Cloudflare Workers Access IPv4 Of Client

I use the free model of Cloudflare Workers. Currently, I have a service where I get the IP address of a user with cf-connecting-ip header. The service works under *

It works perfectly fine but if IPv6 supplied I still need the IPv4.

I’ve seen this link where it talks about Pseudo IPV4 with overwrite headers option.

But is this possible for Cloudflare Workers ? If so, where to enable it ? I couldn’t find it anywhere.

If the client connects over IPv6 there simply won’t be an IPv4 address. You can enable Pseudo IPv4 in the network tab of the dashboard, however, this will be a “fake” IPv4 address.

Then it is not possible. The Worker must run on a real zone where you can change these settings.

1 Like

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