In the webforms version of nopcommerce we had EnsureNonSSL to show some pages as http rather then https. I am working in nopCommerce 2.3 and need the same functionality. I would like to have only sensitive pages secured by https and the rest not. How do I do that in 2.3. I am afraid that SEO suffers if all pages are under SSL.
//the NopHttpsRequirement set on the Controller Action will handle redirecting to Https. // We just need to handle any requests that are already under SSL but should not be. if (Request.IsSecureConnection) { Boolean requireHttps = false; requireHttps = filterContext.ActionDescriptor.GetCustomAttributes(typeof(NopHttpsRequirementAttribute), false).Length >= 1;
//If this request is under ssl but yet the controller action // does not require it, then redirect to the http version. if (!requireHttps && !filterContext.IsChildAction) { UriBuilder uriBuilder = new UriBuilder(Request.Url);
//change the scheme uriBuilder.Scheme = "http"; uriBuilder.Port = 80;
Does anyone know if there's a reason why all pages in nop are set to use https when it's enabled instead of just the admin site, login, and checkout pages? It would make more sense to me that only the pages throughout the site that need it should have it.
It works well for me... Just a pain when it comes upgrade time...
Oliver
Do you need to compile the project? It took me a long time to find out that this was caused by the new nop version (23). I am not a programmar and I want to get rid of the https on normal pages. How do I do it?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.