mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
Add config.php options to set defaults for Cookie class #2184
This commit is contained in:
parent
5005a09f06
commit
a3cde9c109
3 changed files with 34 additions and 3 deletions
|
|
@ -140,6 +140,22 @@ class Security extends Base
|
|||
Config::set('security.x_frame_options', strtoupper($vars->x_frame_options));
|
||||
Config::set('security.x_content_type_options', strtolower($vars->x_content_type_options));
|
||||
|
||||
// Prepare the alternate config key for cookies.
|
||||
if (Config::get('cookie'))
|
||||
{
|
||||
Config::set('cookie.secure', $vars->use_cookies_ssl === 'Y');
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::set('cookie', [
|
||||
'domain' => null,
|
||||
'path' => null,
|
||||
'secure' => $vars->use_cookies_ssl === 'Y',
|
||||
'httponly' => null,
|
||||
'samesite' => 'Lax',
|
||||
]);
|
||||
}
|
||||
|
||||
// Save
|
||||
if (!Config::save())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue