Skip to content

Commit 5947b35

Browse files
authored
Merge pull request #4992 from magento-performance/MC-21788
MC-21788
2 parents 90c5380 + ec4b0d5 commit 5947b35

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

app/code/Magento/Store/Model/StoreCookieManager.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -11,10 +10,13 @@
1110
use Magento\Store\Api\Data\StoreInterface;
1211
use Magento\Store\Api\StoreCookieManagerInterface;
1312

13+
/**
14+
* DTO class to work with cookies.
15+
*/
1416
class StoreCookieManager implements StoreCookieManagerInterface
1517
{
1618
/**
17-
* Cookie name
19+
* @var string
1820
*/
1921
const COOKIE_NAME = 'store';
2022

@@ -41,28 +43,28 @@ public function __construct(
4143
}
4244

4345
/**
44-
* {@inheritdoc}
46+
* @inheritdoc
4547
*/
4648
public function getStoreCodeFromCookie()
4749
{
4850
return $this->cookieManager->getCookie(self::COOKIE_NAME);
4951
}
5052

5153
/**
52-
* {@inheritdoc}
54+
* @inheritdoc
5355
*/
5456
public function setStoreCookie(StoreInterface $store)
5557
{
5658
$cookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata()
57-
->setHttpOnly(true)
59+
->setHttpOnly(false)
5860
->setDurationOneYear()
5961
->setPath($store->getStorePath());
6062

6163
$this->cookieManager->setPublicCookie(self::COOKIE_NAME, $store->getCode(), $cookieMetadata);
6264
}
6365

6466
/**
65-
* {@inheritdoc}
67+
* @inheritdoc
6668
*/
6769
public function deleteStoreCookie(StoreInterface $store)
6870
{

0 commit comments

Comments
 (0)