Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

3

Try to do this via database: -> Go to core_config_data table -> in base_secure or unsecure url change http to https Secondly, check if your server has SSL Certification. Hope it works!


2

to force HTTPS, change your base url to https:// for unsecure too: bin/magento setup:store-config:set --base-url="https://myshop.com/" bin/magento setup:store-config:set --base-url-secure="https://myshop.com/" bin/magento setup:store-config:set --use-secure=1 bin/magento setup:store-config:set --use-secure-admin=1 bin/magento cache:flush also if you have ...


1

Magento has default functionality for set secure(https) and unsecure(http) url. Before update bellow setting backup core_config_data table. Go to Store-> Configuration-> General-> Web->Baseurl(secures) and update http to https. Update the value of Use Secure URLs on Storefront to Yes. Refresh cache php bin/magento cache:clean.


1

Open your database and search your old url. You have to change in this table : core_config_data Now you can see two path like this one is web/unsecure/base_url and second is web/secure/base_url. Please replace its value to your new url. After this, flush your caches and storage. This will solve your problem. Edit: You can saw it in given screenshot.


1

Go to stores > configuration > general > web Put yet to "Use Secure URLs on Storefront" and yes to "Use Secure URLs in Admin", as you did before Also put yet to "Enable HTTP Strict Transport Security (HSTS)"


1

I guess you are using Magento\Framework\App\Action\HttpPostActionInterface in your controller? As I see, Magento 2.3.x has this interface class, but it doesn't exist in lowser version 2.2.x.


1

Provided you are accessing your site over HTTPS and you have no custom code modifying the cookie secure values, you shouldn't need to modify the core code to serve PHPSESSIONID as secure. As its default behavior See for example: https://barberblades.co.uk https://www.bathroomsupastore.com I have not tested this but I believe the Magento 2 equivalent of ...


1

You probably looking for class SecurityInfo which implements SecurityInfoInterface in file path; Magento\Framework\Url\SecurityInfo.php


1

Please try this, Add this in your custom controller contructor. public function __construct(Context $context,\Magento\Framework\App\Request\Http $request){ $this->request = $request; parent::__construct($context); } public function getIddata() { // use $this->request->getParams(); // all params return $...


1

Did you reindex and clean/flush the cache? Try the basics first: bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy bin/magento indexer:reindex bin/magento cache:clean bin/magento cache:flush Make sure your virtual host settings are configured for ssl in apache config.


1

Add the following line to your .htacess file of your magento root: SetEnvIf X-Forwarded-Proto https HTTPS=on Now test the frontend it should work.


Only top voted, non community-wiki answers of a minimum length are eligible