NOTE: I just tested this (2026-06-01) on an Adobe Commerce Cloud site and could not get it to work, despite a couple of developers managing other sites attesting that it did work for them. So YMMV.
We (Kraken Commerce) recommend using Cloudflare in front of Adobe Commerce Cloud environments, as Cloudflare provides excellent bot-fighting and performance tools. However a small change is needed in the Magento VCL to pass the user's IP from Cloudflare>Fastly/Varnish>Nginx so that user's IPs are stored in the access logs correct.
Steps:
- Login to the Magento admin and go to
STORES > Configuration > ADVANCED > Systemand expand theFull Page Cache > Fastly Configuration > Custom VCL Snippetssection. - Click the "Create" button and add this information:
- Name: forward_client_ip (or whatever you want to call it)
- Type: recv
- Priority: 100
- VCL:
# Ensure the user's IP address is forwarded through to Nginx so that the access logs contain the correct IP
if (req.http.cf-connecting-ip) {
set req.http.X-Client-IP = req.http.cf-connecting-ip;
}
- Click the "Upload VCL to Fastly" button
- Before making the change, load url like
https://example.com/customer/account/login/?testing=123in your browser - In New Relic, go to
Logsand filter by `filePath:"/var/log/platform/*/access.log" message:"testing=123" - You'll see the IP listed is not your IP
- Make the change above
- The IP listed should now be your IP