我有以下带路由注释的控制器:
/** * @Route("/checkout/", name="checkout", schemes = "https") */ public function indexAction(Request $request) { //...do stuff }
这在我的开发服务器上工作正常,但是,在我的生产服务器上,我获得了无限的重定向路由.我查看了日志,它是由Symfony引起的,而不是Apache.它一遍又一遍地执行此操作直到我的浏览器停止:
[2014-10-28 17:32:28] request.INFO: Matched route "checkout" (parameters: "_controller": "Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction", "path": "/checkout/", "permanent": "true", "scheme": "https", "httpPort": "80", "httpsPort": "443", "_route": "checkout") [] []
它没有意义,因为页面通过HTTPS请求IS:
https://example.com/checkout/
我在security.yml中没有覆盖它的access_control设置.奇怪的是,所有其他不使用"schemes ="https"的控制器工作.