Issue:
trusted_hosts
and trusted_proxies
configuration properties are set appropriately.X-Forwarded-For
, X-Forwarded-Host
, X-Forwarded-Port
and, what's most important, X-Forwarded-Proto
headers to the HTTP request send to the application.Documentation: Trusting Proxies.
As @A23 suggested you should also check if ELB is using "standard" headers names. If not, change them using one of following:
Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X-Proxy-For');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X-Proxy-Host');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto');