
This warning is because the SSL is provided by the Nginx proxy + Let'sEncrypt + Cloudflare. So Matomo sees an https URL but actually runs HTTP on the 80 port.
The solution is to add the line assume_secure_protocol=1 below the [General] section in the Matomo configuration.