Mixed Content SSL

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
Seems that I am getting mixed content because of the RssHeaderLink is specifying http.

Using 2.5
Il y a 12 ans
If I change the store URL to https it fixes the SSL problem, however all Images in my store show a SRC=http://

Is there something wrong with PictureModel.ImageUrl?
Il y a 12 ans
Just did fresh install and this is a problem with NopCommerce
Il y a 12 ans
I Fixed it.  I replaced all

(_webHelper.GetStoreLocation()) in PictureService.cs

with

(_webHelper.GetStoreLocation(true))

I also replaced those in BlogController and NewsController.

Is there a way this canbe automatically changed if SSL is selected?
Il y a 12 ans
Actually _webHelper.GetStoreLocation() already returns "https" if a requested URL is SSL secured. And it returns "http" if a requested URL is not SSL secured
Il y a 12 ans
I am also having trouble with this. I am using nopCom v2.5.

thrifty34 wrote:
I Fixed it.  I replaced all

(_webHelper.GetStoreLocation()) in PictureService.cs

with

(_webHelper.GetStoreLocation(true))



I don't think it's a good idea to permanently uses secure connections for images.

a.m. wrote:
Actually _webHelper.GetStoreLocation() already returns "https" if a requested URL is SSL secured. And it returns "http" if a requested URL is not SSL secured


Yes this is true, but does not explain why images in the shopping cart page use secure connections and images on the home page do not when they both use the same _webHelper.GetStoreLocation() method.

I have cleared my browser cache and have clicked the 'clear cache' link within nopCom admin and restarted the application several times.

I now think it is a problem with server side cache. For example on LINE 318 of control \Presentation\Nop.Web\Controllers\CatalogController.cs method PrepareProductOverviewModel is used to generate the Best seller’s grid on the home page. I'm no expert so haven't looked into the cache logic yet. Is it is possible to build into the cache logic a check for secure connection or not. Alternatively, should we just set the home page, item pages etc. to always use a non-secure channel?
Il y a 12 ans
[email protected] wrote:
I now think it is a problem with server side cache. For example on LINE 318 of control \Presentation\Nop.Web\Controllers\CatalogController.cs method PrepareProductOverviewModel is used to generate the Best seller’s grid on the home page. I'm no expert so haven't looked into the cache logic yet. Is it is possible to build into the cache logic a check for secure connection or not. Alternatively, should we just set the home page, item pages etc. to always use a non-secure channel?

You're absolutely right. There is where the issue is. I'll fix it in the near time.
Il y a 12 ans
That's great news a.m. - I'll patch it as soon as you can make it!

Thanks for your help!
Il y a 12 ans
Fixed. Please see changeset 0df6444dd4ea
Il y a 12 ans
Patched & Deployed - Your change set appears to be working fine. No problems so far.

Thanks again!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.