小编Daw*_*wid的帖子

ZF2并强制特定路由的HTTPS

我正在尝试在访问/ account route下的任何页面时实现强制https.我发现这个问题ZF2与https一起使用,它可以...部分工作.我的路线:

'router' => array(
    'routes' => array(
        'account' => array(
            'type' => 'Scheme',
            'options' => array(
                'route' => '/account',
                'scheme' => 'https',
                'defaults' => array(
                    'controller' => 'Account\Controller\Account',
                    'action' => 'index',
                ),
            ),
            'may_terminate' => true,
            'child_routes' => array(
                'default' => array(
                    'type' => 'Literal',
                    'options' => array(
                        'route' => '/',
                        'defaults' => array(
                            'controller' => 'Account\Controller\Account',
                            'action' => 'index',
                        ),
                    ),
                ),
                'signin' => array(
                    'type' => 'Segment',
                    'options' => array(
                        'route' => '/signin[/:type]',
                        'defaults' …
Run Code Online (Sandbox Code Playgroud)

https routes zend-framework2

3
推荐指数
1
解决办法
4769
查看次数

标签 统计

https ×1

routes ×1

zend-framework2 ×1