mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Enable secure session and cookies by default if installed or upgraded in an HTTPS site
This commit is contained in:
parent
7ce40653d7
commit
d0d1505367
2 changed files with 9 additions and 0 deletions
|
|
@ -184,6 +184,8 @@ class ConfigParser
|
|||
if (isset($db_info->use_ssl) && in_array($db_info->use_ssl, ['always', 'optional']))
|
||||
{
|
||||
$config['url']['ssl'] = 'always';
|
||||
$config['session']['use_ssl'] = true;
|
||||
$config['session']['use_ssl_cookies'] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -204,6 +204,13 @@ class installController extends install
|
|||
// Set the default umask.
|
||||
$config['file']['umask'] = Rhymix\Framework\Storage::recommendUmask();
|
||||
|
||||
// Set default security settings.
|
||||
if ($config['url']['ssl'] === 'always')
|
||||
{
|
||||
$config['session']['use_ssl'] = true;
|
||||
$config['session']['use_ssl_cookies'] = true;
|
||||
}
|
||||
|
||||
// Load the new configuration.
|
||||
Rhymix\Framework\Config::setAll($config);
|
||||
Context::loadDBInfo($config);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue