Beispiel #1
0
 /// <summary>
 /// Gets the security mode for the store
 /// </summary>
 public HttpSecurityMode GetSecurityMode(bool?useSsl = null)
 {
     if (useSsl ?? SslEnabled)
     {
         if (SecureUrl.HasValue() && Url.HasValue() && !Url.StartsWith("https"))
         {
             return(HttpSecurityMode.SharedSsl);
         }
         else
         {
             return(HttpSecurityMode.Ssl);
         }
     }
     return(HttpSecurityMode.Unsecured);
 }
Beispiel #2
0
        private string GetHostInternal(bool secure)
        {
            var host = string.Empty;

            if (secure && SslEnabled)
            {
                if (SecureUrl.HasValue())
                {
                    host = SecureUrl;
                }
                else
                {
                    host = Url.Replace("http:/", "https:/");
                }
            }
            else
            {
                host = Url;
            }

            return(host.EnsureEndsWith("/"));
        }