Help regarding WebSocket #12839
Rohit-2602
started this conversation in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I'm currently exploring the implementation of WebSocket functionality within my React Native project. Here's a snippet of the WebSocket instantiation:
This setup works fine on Android and iOS platforms. However, on the Windows platform, I've encountered an issue where the Origin header value gets overridden. I checked the native code and I found this piece of code -
// vnext/Shared/Networking/WinRTWebSocketResource.cpp
In an attempt to address this, I manually attempted to hardcode the Origin value as follows (updating the node_modules)
(node_modules/react-native-windows/Shared/Networking/WinRTWebSocketResource.cpp)
This change resolves the issue in debug mode. However, it fails to function as expected in release mode.
I'm seeking assistance in resolving this issue/problem. Any insights or guidance on how to rectify this situation would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions