From 1ad351195da172123620200956760281cf6999f6 Mon Sep 17 00:00:00 2001 From: Korov Date: Fri, 26 Apr 2024 20:09:55 +0800 Subject: [PATCH] fix: websocket support custom port (#5123) Co-authored-by: nathan --- frontend/appflowy_flutter/lib/env/cloud_env.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/appflowy_flutter/lib/env/cloud_env.dart b/frontend/appflowy_flutter/lib/env/cloud_env.dart index 27c4469f45..9e8ea0d4f9 100644 --- a/frontend/appflowy_flutter/lib/env/cloud_env.dart +++ b/frontend/appflowy_flutter/lib/env/cloud_env.dart @@ -319,7 +319,8 @@ Future _getAppFlowyCloudWSUrl(String baseURL) async { // Construct the WebSocket URL directly from the parsed URI. final wsScheme = uri.isScheme('HTTPS') ? 'wss' : 'ws'; - final wsUrl = Uri(scheme: wsScheme, host: uri.host, path: '/ws/v1'); + final wsUrl = + Uri(scheme: wsScheme, host: uri.host, port: uri.port, path: '/ws/v1'); return wsUrl.toString(); } catch (e) {