Description
Hello.
I'm using Symfony 2.8.12
Error message:
PHP Fatal error: Uncaught exception 'Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException' with message 'The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.' in /[...]/app/bootstrap.php.cache:783\nStack trace:
0 /[...]/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php(40): Symfony\Component\HttpFoundation\Request->getClientIps()
1 [internal function]: Symfony\Component\HttpKernel\EventListener\ValidateRequestListener->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
2 /[...]/app/cach in /[...]/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php on line 67, referer: [...]
This error happens only when we use Google Data Compression Proxy. This is option in Chrome Mobile browser "Saving data" (or maybe "Data compression" in Polish it's "Oszczędzanie danych"). While it's turned on, we get this message when we tried enter on any site.
This error doesn't happen in earlier versions of Symfony. Some of projects using version 2.8.5 and it working fine.
Probably this change make a trouble.
Only this change working for me and prevent from errors
unset($_SERVER["HTTP_FORWARDED"]);
Probably it's connected with this error
Regards and thanks for any help.