mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-01 03:49:24 +08:00 
			
		
		
		
	fix ipv6 connection problem
This commit is contained in:
		| @@ -32,12 +32,14 @@ export default { | |||||||
|     created() { |     created() { | ||||||
|         window.addEventListener("resize", this.onResize); |         window.addEventListener("resize", this.onResize); | ||||||
|  |  | ||||||
|  |         let protocol = (location.protocol === "https:") ? "wss://" : "ws://"; | ||||||
|  |  | ||||||
|         let wsHost; |         let wsHost; | ||||||
|         const env = process.env.NODE_ENV || "production"; |         const env = process.env.NODE_ENV || "production"; | ||||||
|         if (env === "development" || localStorage.dev === "dev") { |         if (env === "development" || localStorage.dev === "dev") { | ||||||
|             wsHost = ":3001" |             wsHost = protocol + location.hostname + ":3001"; | ||||||
|         } else { |         } else { | ||||||
|             wsHost = "" |             wsHost = protocol + location.host; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         socket = io(wsHost, { |         socket = io(wsHost, { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user