cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable the Magento cookies secure

how to enable the Magento cookies secure

Hi 


how to enable the secure cookies on Magento 

 

I refer many article and Magento admin settings 

 public function getCookieSecure(): bool
    {
        return $this->sessionConfig->getCookieSecure();
    }

 

and 

image.png

3 REPLIES 3

Re: how to enable the Magento cookies secure

i am facing the same problem and unable to find the exact solution for this problem. PLease ping me back if you find the answer

Re: how to enable the Magento cookies secure

Go To
Stores > Configuration > (General) > Web > Default Cookie Settings

Cookie Lifetime. It’s how long Cookie files stay on user’s computer. By default it’s set as 3600 seconds which is equal to about 1 hour. If you want to ensure that cookies expire when a user closes their browser, then select 0 here.

Cookie Path. To make cookies available for some particular folders, enter the Cookie Path here. If you want them to be available anywhere on your site, then enter a “/”.

Cookie Domain. If you want to enable cookies for a subdomain, enter it here. If you want to enable cookies for all subdomains, enter something like “.domain.com” (make sure there is a “.” before your domain name).

Use HTTP Only. To prevent your store from Malware, select “Yes” here. It uses HTTP protocol only and doesn’t allow other protocols such as JavaScript. Cookie Restriction Mode. You need to select “Yes” here.



Re: how to enable the Magento cookies secure