All visitor IPs are 127.0.0.1

I’ve noticed that recently in Piwik all visitors IPs are being shown as 127.0.0.1. Other details such as location, browser and referrer are correct by the IPs are consistently wrong.

What’s happening here?

Probably your Piwik is behind a proxy and it’s not configured in Piwik, see: How do I configure Piwik when the server is installed behind a proxy? - Analytics Platform - Matomo

Perhaps, is it just the following line that is needed in the config?

proxy_client_headers[] = HTTP_CF_CONNECTING_IP