【发布时间】:2015-11-29 10:17:32
【问题描述】:
我正在使用 CI 2.1.4 和 HMVC,我遇到了安全类和配置文件的问题。 我在 app/config 文件夹中有 3 个带有自定义配置文件和默认 config.php 文件的模块。
application
config
config.php // Default security config
$config['global_xss_filtering'] = false;
$config['csrf_protection'] = false;
$config['csrf_token_name'] = 'xxx';
$config['csrf_cookie_name'] = 'xxx';
$config['csrf_expire'] = 7200;
modules
module_1
config
config.php // with this config
$config['global_xss_filtering'] = true;
module_2
config
config.php // with this config
$config['global_xss_filtering'] = true;
$config['csrf_protection'] = true;
$config['csrf_token_name'] = 'yyy';
$config['csrf_cookie_name'] = 'yyy';
$config['csrf_expire'] = 7200;
module_3
config
config.php // default config
但不起作用,配置文件不会被模块配置设置覆盖
【问题讨论】:
标签: php codeigniter config hmvc csrf-protection