I need to pass users real IP through varnish to apache for maintenance mode. At the moment the IP is passed as 127.0.0.1
I'm using Magento 2 stack. I have see something like
sub vcl_recv {
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;
}
But after adding I get an error when restarting Varnish. could you help please