]> git.proxmox.com Git - mirror_novnc.git/commitdiff
The https check should come first
authorJohn Dewey <john@dewey.ws>
Sat, 21 Sep 2013 19:19:09 +0000 (12:19 -0700)
committerJohn Dewey <john@dewey.ws>
Sat, 21 Sep 2013 19:19:09 +0000 (12:19 -0700)
A similar change was made to ui.js in #252.

vnc_auto.html

index 2aa2188978d03f444c71cff9a82db863d0227509..bd905ffa14f1062649cebcb19de676ea1f295785 100644 (file)
             // if port == 80 (or 443) then it won't be present and should be
             // set manually
             if (!port) {
-                if (window.location.protocol.substring(0,4) == 'http') {            
-                    port = 80;
-                }
-                else if (window.location.protocol.substring(0,5) == 'https') {            
+                if (window.location.protocol.substring(0,5) == 'https') {            
                     port = 443;
                 }
+                else if (window.location.protocol.substring(0,4) == 'http') {            
+                    port = 80;
+                }
             }
 
             // If a token variable is passed in, set the parameter in a cookie.