Varnish and devices?

I have a Nginx-Varnish-Apache2 stack at DigitalOcean droplet. Matomo is 3.13.1 using JS-tracking and is quite new one, and it is working quite nicely, but it doesn’t show any devices at all. All are unknown.

If somebody has a quick fix, I’m totally happy, but I know too that settings of all those three may affect. So, is this issue of missing devices ecause of virtual hosts are behind Varnish, Matomo is behind Varnish or is there something else I have to check?

I’ll answer to me: It was because of Matomo was behind Varnish.

Can anybody guess why? I used return (pipe); so Varnish acted like a dum TCP proxy passing everything as is to Apache. Obviously it did something, because bypassing Varnish started logging of devices.