Fix: Kiwi incorrectly assumes HTTP on HTTPS connection
authorJack Allnutt <m2ys4u@Gmail.com>
Sun, 23 Sep 2012 23:28:07 +0000 (00:28 +0100)
committerJack Allnutt <m2ys4u@Gmail.com>
Sun, 23 Sep 2012 23:28:07 +0000 (00:28 +0100)
client_backbone/dev/model_application.js

index 7a1f88f843ed4d1956e13ef35b94a2a81cc75825..9952ac205401bf524c5784142c1da5d5289cc82b 100755 (executable)
@@ -72,16 +72,10 @@ kiwi.model.Application = function () {
         // If running from file, default to localhost:7777 by default\r
         if (window.location.protocol === 'file') {\r
             this.kiwi_server = 'http://localhost:7777';\r
-\r
         } else {\r
             // Assume the kiwi server is on the same server\r
-            var proto = window.location.protocol === 'https' ?\r
-                'https' :\r
-                'http';\r
-\r
-            this.kiwi_server = proto + '://' + window.location.host;\r
+            this.kiwi_server = window.location.protocol + '//' + window.location.host;\r
         }\r
-        \r
     };\r
 \r
 \r