Problem with configuring yubikey in self-hosted gitlab


I’m using a self-hosted gitlab (version 12.8.2) which is behind reverse proxy (apache). HTTPS is configured on that apache (letsencrypt certs) and proxypass is configured to proxy requests to http://git:80.
Everything is working good, except yubikeys.

When I try to add yubikey gitlab immediately throws an error:

There was a problem communicating with your device. (error code: 2)

Nothing in reverse proxy logs, nothing in gitlab’s webserver logs, nothing in developer tools console.

I know that the yubikey is working, because I have successfully set it up for nextcloud instance, which is configured the same way as gitlab (I even tried to replicate all the options and rules from virtual host of nextcloud).

Is there something I’m missing?

Thank you very much.