File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/code/Magento/Store/Model Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- *
43 * Copyright © Magento, Inc. All rights reserved.
54 * See COPYING.txt for license details.
65 */
1110use Magento \Store \Api \Data \StoreInterface ;
1211use Magento \Store \Api \StoreCookieManagerInterface ;
1312
13+ /**
14+ * DTO class to work with cookies.
15+ */
1416class 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 {
You can’t perform that action at this time.
0 commit comments