socketio / socket.io-client-swift

Other
5.22k stars 843 forks source link

`WSS` protocol does not trigger secure config #1400

Open om-ha opened 2 years ago

om-ha commented 2 years ago

If protocol is wss instead of https, then secure is not set to true.

https://github.com/socketio/socket.io-client-swift/blob/a1ed825835a2d8c2555938e96557ccc05e4bebf3/Source/SocketIO/Manager/SocketManager.swift#L569-L570

This should be:

 if socketURL.absoluteString.hasPrefix("https://") ||  socketURL.absoluteString.hasPrefix("wss://") { 
     _config.insert(.secure(true))