Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am using Ionic 2 webview for app development. I am trying to create open websocket connection using
var ws = new WebSocket("ws://example.com");
It opens up a connection successfully in ios but 403 forbidden in android.
While debugging I came to know that cookies were not passed as part of request header during handshake. Also origin header has http:// for ios and file:// for android.
Code part is exactly same for both platforms.
Note: Tested in android 6.0 and 5.0
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.