diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index fe668c15..36f3836f 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -62,9 +62,9 @@ namespace Swarmops // Check for SSL and force it - if (!Request.IsSecureConnection) + if (!Request.IsSecureConnection || Request.Url.ToString().StartsWith("http://")) // Both are necessary, as some reverse proxies will https-ify an original nonsecure connection { - if (!Request.Url.ToString().StartsWith("http://dev.swarmops.com/") && !Request.Url.ToString().StartsWith("http://live.activizr.com") && !Request.Url.ToString().StartsWith("http://localhost:") && !Request.Url.ToString().StartsWith("http://cryptdb")) + if (!Request.Url.ToString().StartsWith("http://dev.swarmops.com/") && !Request.Url.ToString().StartsWith("http://sandbox.swarmops.com") && !Request.Url.ToString().StartsWith("http://localhost:") && !Request.Url.ToString().StartsWith("http://cryptdb")) { // Response.Redirect(Request.Url.ToString().Replace("http:", "https:")); diff --git a/Site5/Security/Login.aspx.cs b/Site5/Security/Login.aspx.cs index 79c00d40..0de7796e 100644 --- a/Site5/Security/Login.aspx.cs +++ b/Site5/Security/Login.aspx.cs @@ -33,9 +33,9 @@ namespace Swarmops.Pages.Security // Check for SSL - if (!Request.IsSecureConnection) + if (!Request.IsSecureConnection || Request.Url.ToString().StartsWith("http://")) // Both are necessary, as some reverse proxies will https-ify an original nonsecure connection { - if (!Request.Url.ToString().StartsWith("http://dev.activizr.com/") && !Request.Url.ToString().StartsWith("http://localhost:") && Request.Url.ToString().StartsWith("http://activizr-") && Request.Url.ToString().StartsWith("http://live.activizr.com")) + if (!Request.Url.ToString().StartsWith("http://dev.activizr.com/") && !Request.Url.ToString().StartsWith("http://localhost:") && Request.Url.ToString().StartsWith("http://activizr-")) { Response.Redirect(Request.Url.ToString().Replace("http:", "https:")); }