Nginx reverse proxy

I am experiencing the following issue with NGINX used as a reverse proxy on a nextcloud 12 installation. I keep getting this error message when connecting through the nginx reverse proxy, however, connecting directly to the server works just fine.

"Connection to server lost…’ on the main page after the login.

Nothing in error logs, nothing in nginx error logs.