HTTP_X_FORWARDED_FOR显示ipv6和ipv4

I'm working on a website, that needs to show extra info for certain ip addresses. I'm using $_SERVER['HTTP_X_FORWARDED_FOR'], since the server is in Docker.

The weird part is that a phpinfo() shows this:

$_SERVER['HTTP_X_FORWARDED_FOR']    ::ffff:172.17.28.1

It seems to me like it is both a ipv6 AND ipv4? (how is this possible?)

Now for the question - how can I fetch the ipv4 part?

Best regards - Lars

It was the HA proxy setting that allowed both ipv6 and ipv4.

This has now been changed to only ipv4 and now everybody is happy.