Matomo with AWS application load balancer

Hello,

I am currently trying to run matomo in a multi server environment using AWS application load balancer
It works properly when I have only one operational instance behind the load balancer but when another one comes online I get the following error:

Error : Form security failed. Please reload the form and check that your cookies are enabled. If you use a proxy server, you must configure Matomo to accept the proxy header that forwards the Host header. Also, check that your Referrer header is sent correctly.

I checked my configurations and they’re all set as the documentation says in https://matomo.org/faq/how-to-install/#faq_98

I am using Amazon Linux, Nginx, and the latest version of Matomo

Also, I have a different environment running with the same exact configurations. The only difference is that I m using AWS ALB instead of a classic load balancer.

Any help would be appreciated

Regards