Build machine is stupid again

This commit is contained in:
Rick Falkvinge
2014-09-08 19:29:21 +00:00
parent 86b4d68bc6
commit 1a12ea2ef1
2 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -61,10 +61,15 @@ namespace Swarmops
// Check for SSL and force it
string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"];
// Special case for CloudFlare deployments - there is a case where somebody will get their connections de-SSLed at the server
string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"];
bool cloudFlareSsl = (cloudFlareVisitorScheme.Contains("\"scheme\":\"https\"") ? true : false);
// TODO: Same thing for Pound deployments
// Rewrite if applicable
if (Request.Url.ToString().StartsWith("http://") && !cloudFlareSsl) // only check client-side as many server sites de-SSL the connection before reaching the web server
{
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://swarmops-"))
+7 -2
View File
@@ -32,9 +32,14 @@ namespace Swarmops.Pages.Security
// Check for SSL and force it
string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"];
// Special case for CloudFlare deployments - there is a case where somebody will get their connections de-SSLed at the server
bool cloudFlareSsl = (cloudFlareVisitorScheme.Contains("\"scheme\":\"https\"")? true: false);
string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"];
bool cloudFlareSsl = (cloudFlareVisitorScheme.Contains("\"scheme\":\"https\"") ? true : false);
// TODO: Same thing for Pound deployments
// Rewrite if applicable
if (Request.Url.ToString().StartsWith("http://") && !cloudFlareSsl) // only check client-side as many server sites de-SSL the connection before reaching the web server
{