diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java index 9634e6343..d64a2c019 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java @@ -281,6 +281,8 @@ public class WebSocketModule extends ReactContextBaseJavaModule { scheme += "https"; } else if (requestURI.getScheme().equals("ws")) { scheme += "http"; + } else if (requestURI.getScheme().equals("http") || requestURI.getScheme().equals("https")) { + scheme += requestURI.getScheme(); } if (requestURI.getPort() != -1) {