1
我有一个使用Symfony 3.2的应用程序,自昨天起运行良好。当我尝试访问应用程序时,我有一个BadRequestHttpException,它告诉我在我的请求中有两个冲突的http头:FORWARDED和X_FORWARDED_FOR。Symfony 3中http头之间的冲突
Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException (code:
0):The request headers contain conflicting information regarding the origin
of this request. at /home/biotekagee/gdpl/var/cache/prod/classes.php:4630,
Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException (code:
0): 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. at
/home/biotekagee/gdpl/var/bootstrap.php.cache:1297
事情我已经通知:
- 的问题出现在生产environement。当使用DEV(app_dev.php)一切都很好
- 所以我试图找到问题app.php,当我评论线
$kernel = new AppCache($kernel)
问题就解决了。我想,然后从HttpCache - 问题COM我没有使用任何代理
- 清除缓存在所有
我一直在Symfony的工作没有帮助不到一年的我米仍然是一个noob,这个错误真的让我很紧张。我希望有人能够帮助我。
https://github.com/contao/standard-edition/issues/45 – COil
@COIL感谢您的链接,我发现了一些可以解决问题的东西,但它在您给我的问题中提到并不正确。仍然不知道问题出在哪里,我仍然不明白... – Matthew