Cluster behind a Secure Proxy

Hi. I installed 2 Piwik servers behind a 2 balanced Proxy servers using SSL (HTTPS - HTTP) . Please look at attached diagram.

Both servers work right when session save handler is file. Both have all configurations needed to be functional behind the proxy (assume_secure_protocol = 1, and HTTP_X_FORWARDED_FOR AND HTTP_X_FORWARDED_HOST defined)

The problem is presented when I change the behavior of the session save handling to dbtable. Piwik shows an 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 Piwik to accept the proxy header that forwards the Host header. Also, check that your Referer header is sent correctly.”

Is there any configuration i am missing?