在 Android 上使用 Chrome 的流量保护程序访问我的 Symfony 网站会生成错误 500。
这是日志
[2017-04-06 18:56:23] request.ERROR: Uncaught PHP Exception
Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
"The request headers contain conflicting information regarding the origin of this request." at /home/myapp/app/bootstrap.php.cache line 3184
{"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException(code: 0): The request headers contain conflicting information regarding the origin of this request. at /home/myapp/app/bootstrap.php.cache:3184, Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException(code: 0): 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. at /home/myapp/app/bootstrap.php.cache:788)"} []
据我了解,Chrome 的数据保护程序在我的应用程序压缩代码和图像之前充当反向代理。
我阅读了这篇文档,了解如何在 Symfony 应用程序前使用反向代理。
问题是我没有找到任何关于 IP Chrome 数据保护程序代理正在使用的文档。
感谢帮助!