Open tynes opened 5 years ago
I think we'd also need to add support for it on the SocketManager too right?
Because the server is currently served on both http and https, we would have to support both ws and wss simultaneously in the SocketManager. Maybe its better to always serve over the same port and one of http or https, so that SocketManager also only has to accept one or the other. There is already configuration for serving over TLS, so the SocketManager could use that value. This would also prevent accidental usage of bpanel over http when it was meant to be over https
Yeah, I was thinking the same thing when reviewing the server code recently, probably better to just run one or the other. Avoiding "accidental" unsafe access is definitely a huge added benefit.
I noticed that running the server over TLS, the websocket connection still attempts to happen over
ws
instead ofwss
. Thewindow.protocol
is stored in redux, a line of code could probably be added here or so: https://github.com/bpanel-org/bpanel/blob/development/webapp/store/actions/socketActions.js#L9 to fix this