【发布时间】:2014-06-07 02:19:38
【问题描述】:
我有一个 symfony2 应用程序。
在 prod 服务器上,我希望我的所有路由都通过 https,而在 dev 中,我希望能够使用 http。我如何单独使用 symfony2 来实现这一点?我不想碰网络服务器配置。
我尝试在我的 routing.yml 中添加此内容
myBundle:
resource: "@MyBundle/Controller/"
type: annotation
prefix: /
schemes: [https]
在我的routing_dev.yml 中有这个:
myBundle:
resource: "@MyBundle/Controller/"
type: annotation
prefix: /
schemes: [http]
_main:
resource: routing.yml
即使在开发模式下它仍然想去 https。
【问题讨论】: