1

I have set the secure_base_url to httpsand also have set Use Secure URLs in Frontend to yes. Still when i navigate the site i get warnings such as

Mixed Content: The page at 'https://mysite/customer/account/index/' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://mysite/checkout/cart/updatePost/'. This endpoint should be made available over a secure connection.

When i change the unsecure_base_urlto https the site works perfectly without any warnings. Still i don't want to secure all the pages of the site by changing the unsecure_base_urlto https. I want to set certain pages secure (by setting only the secure_base_url to https) without SSL mixed content. How can i solve this problem?

  • the problem maybe your custom theme or cache – MagenX May 8 '16 at 14:48
  • @MagenX i don't want to make my whole site secure. I just want to make certain pages secure (by setting only the secure_base_url to https) without SSL mixed content. – Lakshin Karunaratne May 8 '16 at 15:27
  • exactly, customer page is secure, but code to /checkout/cart/ is not secure. you have to check that part of the page/theme etc – MagenX May 8 '16 at 21:10
  • it has used $this->getUrl('checkout/cart/updatePost') – Lakshin Karunaratne May 9 '16 at 15:58
1

Fixed it using the first answer of this Use secure urls on front end breaks ajax loading into cart

my url was $this->getUrl('checkout/cart/updatePost').

Replaced it with $this->getUrl('checkout/cart/updatePost', array('_forced_secure' => $this->getRequest()->isSecure())); and it started working fine

Not the answer you're looking for? Browse other questions tagged or ask your own question.