Эх сурвалжийг харах

Fixed desktop cache websocket port issue

TC pushbot 5 4 жил өмнө
parent
commit
d0f78f3731
1 өөрчлөгдсөн 5 нэмэгдсэн , 2 устгасан
  1. 5 2
      web/desktop.system

+ 5 - 2
web/desktop.system

@@ -5228,7 +5228,11 @@
 
             var port = window.location.port;
             if (window.location.port == ""){
-                port = "80";
+                if (location.protocol !== 'https:') {
+                    port = "80";
+                }else{
+                    port = "443";
+                }
             }
 
             thumbRenderWebSocket = new WebSocket(protocol + window.location.hostname + ":" + port + "/system/file_system/handleCacheRender?folder=" + path);
@@ -5505,7 +5509,6 @@
                     }else{
                         port = "443";
                     }
-                    
                 }
 
                 let uploadDir = "user:/Desktop";