4 ms·
I was hoping for a good answer, rather than "this is hard and it will just get worse." We have an old app that my team is modernizing with this exact situation
by rootusrootus 8y ago
I was hoping for a good answer, rather than "this is hard and it will just get worse." We have an old app that my team is modernizing with this exact situation. Uses websockets now, but that's an historical thing and all the web apps were non-secure so it worked okay. Now everyone wants SSL turned on, and this puts the websocket method in jeopardy. Somebody before me decided we should switch all the inter-app communication to an external XMPP server. Ugh.
- vbezhenar 8y agoTheoretically you should be able to use ws://127.0.0.1 from https context but I'm not aware if it's already well supported in the browsers.
- recursive 8y agoWhat's wrong with wss://?
- rootusrootus 8y agoAs a practical matter you cannot implement a localhost secure websocket. Essentially all of the methods for communicating between a web app and a native app are some kind of ugly hack and none are supported well enough that you can feel confident they'll stick around for any length of time in all the major browsers.
- anty 8y agoSame here. We use a subdomain with HTTPS that points to 127.0.0.1, and a WebSockets-Server on our clients machines. We install the private key on each machine for this to work... yeah. It's always a nightmare, when a browser-upgrade comes along and changes something. Currently the following connections work: "wss://localhost.example.com:4321/somepath", // Mac: Chrome, Safari, FF "wss://localhost:4321/somepath", // Win: Chrome, FF "wss://127.0.0.1:4320/somepath" // Win: EDGE, IE11, IE10 Some other combinations are possible, that's just what I know we use atm. The worst thing is: I didn't find a way to catch connection-errors to these URLs. So I have to use timeouts, and try all of them... (or decide by User-Agent which URLs to try.) I wish there would be some kind of standard that solves this problem.
- TorKlingberg 8y agoWell, this is the reason why everything round-trips to a cloud service now.