- Visiting some/all pages show "A client error has occurred"
- Watchdog log contains errors similar to this:
... Symfony\Component\HttpKernel\Exception\BadRequestHttpException: The request has both a trusted "FORWARDED" header and a trusted "X_FORWARDED_FOR" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one. in Symfony\Component \HttpKernel\HttpKernel->handle() (line XX of /mnt/www/html/ [sitename]/vendor/symfony/http-kernel/HttpKernel.php) ...
This issue has been reproduced with the following steps when a Drupal site exhibits the problem:
- Clear Drupal cache
- Visit site without the Google Data Saver extension enabled, confirm a page is a HTTP status 200
- Enable the Data Saver extension
- Clear Drupal cache again
- Visit site again; page status code should be a 400 Bad Request (You can see this in the browser inspector)
This issue stems from a combination of:
- having a recent update of Drupal (and the Symfony components)
- incoming requests from a web browser (desktop or mobile) using Google Data Compression (https://developer.chrome.com/multidevice/data-compression)
- with the results of the problem potentially ending up cached in Drupal's internal cache for other browsers (regardless of them using the Google Compression proxy or not).
This issue is being handled in the Symfony project here: https://github.com/symfony/symfony/issues/20215
You can do either of the following actions:
- Roll back your Drupal updates to sidestep the problem
- Avoid using Google Data Saver
- Apply some of the advice/patches provided in https://github.com/symfony/symfony/issues/20215