Login error: form security failed because of an invalid "Referer" header

Hi, I have been trying to set up matomo using docker compose with teleport as the proxy. I can get to the initial setup page and go through the configurations. Then when I go to login I get an error.

Error : The form security failed because of an invalid “Referer” header. If you are using a proxy server, you must configure Matomo to accept the proxy header that forwards the host header. Also, check that your “Referer” header is sent correctly. If you previously connected using HTTPS, please ensure you are connecting over a secure (SSL/TLS) connection and try again.

I have seen a few other posts on this forum related to the same issue. However I have not found a way to solve it. Is matomo expecting a certain value in the referer header?

I have not worked with http headers before and feel a little overwhelmed. Any help or guidance would be very much appreciated.