Cannot login, due to Form security

Hi,
I just installed The latest Matomo for the first time. The installation went fine but I cannot login. The error message reads: „ Error : Form security failed, invalid origin. If you previously connected using https, please ensure you are connecting over a secure (SSL/TLS) connection and try again.“ I tried various browsers.

The nginx log says: „ 2022/01/21 16:42:14 [warn] 1677878#1677878: *1757 an upstream response is buffered to a temporary file /var/lib/nginx/fastcgi/2/00/0000000002 while reading upstream, client: 80.187.X.X, server: XXX, request: “GET /index.php?module=Proxy&action=getCoreJs&cb=e339824af7bdf9f57384eaf59d02e639 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.4-fpm.sock:”, host: “XXX”“

The Webserver uses nginx with php7.4-fpm. WordPress is working fine.

Any idea how to solve this and get it working?

I used the template from nginx-matomo, but I can provide config files if that helps. I did not change anything in config/config.ini.php

I think the log entry is not related to the issues, as the entry is not created for any request.

I really don’t know where I should look for how to resolve this issue.

I found a fix, listed in the discussion of this bug: https://issues.matomo.org/15083

The solution was to remove the line “Header set Referrer-Policy “no-referrer”” from the nginx configuration as mentioned by @xshadow.