mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 07:42:11 +09:00
Change default Cookie path to "/" for compatibility with JS function setCookie()
This commit is contained in:
parent
8d2b7101f4
commit
80e50d41f5
5 changed files with 6 additions and 6 deletions
|
|
@ -60,7 +60,7 @@ class Cookie
|
|||
// Set defaults.
|
||||
if (!array_key_exists('path', $options))
|
||||
{
|
||||
$options['path'] = config('cookie.path') ?? \RX_BASEURL;
|
||||
$options['path'] = config('cookie.path') ?? '/';
|
||||
}
|
||||
if (!array_key_exists('domain', $options) && ($default_domain = config('cookie.domain')))
|
||||
{
|
||||
|
|
@ -87,7 +87,7 @@ class Cookie
|
|||
else
|
||||
{
|
||||
$expires = $options['expires'];
|
||||
$path = $options['path'] ?? \RX_BASEURL;
|
||||
$path = $options['path'] ?? '/';
|
||||
$domain = $options['domain'] ?? null;
|
||||
$secure = $options['secure'] ?? false;
|
||||
$httponly = $options['httponly'] ?? false;
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ class UA
|
|||
{
|
||||
if (in_array($color_scheme, ['light', 'dark']))
|
||||
{
|
||||
Cookie::set('rx_color_scheme', $color_scheme, ['expires' => 365]);
|
||||
Cookie::set('rx_color_scheme', $color_scheme, ['expires' => 365, 'path' => \RX_BASEURL]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue