• [@ Garry] Enable secure websockets
    10 replies, posted
I really love you for allowing websockets, but I can't use them because my website runs on SSL. So, whenever I try to let it connect with the websocket, I'm getting this: [QUOTE]Mixed Content: The page at 'https://**URL**/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://IP:PORT/PASS'. This request has been blocked; this endpoint must be available over WSS. Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.[/QUOTE]
I'm not a fan of bumping, but I really need (want) this. Any chance Garry will reply? :D
It seems to be complaining that your websocket isn't secure, and it only wants to do secure websockets if the page is HTTPS. So it's most likely an issue at your end. [editline]1st March 2016[/editline] The error literally says you have to use wss:// (WebSocket Secure)
[QUOTE=LegoGuy;49842302]It seems to be complaining that your websocket isn't secure, and it only wants to do secure websockets if the page is HTTPS. So it's most likely an issue at your end. [editline]1st March 2016[/editline] The error literally says you have to use wss:// (WebSocket Secure)[/QUOTE] Which doesn't work, because it's not implemented? [editline]1st March 2016[/editline] And after some Googling, I might be wrong about this. If I'm understanding [url]http://stackoverflow.com/questions/9745249/html5-websocket-with-ssl[/url] correctly, WSS is always enabled? But when I try it with wss://, it doesn't seem to connect :/ [editline]1st March 2016[/editline] [QUOTE]WebSocket connection to 'wss://ip:port/pass' failed: Error in connection establishment: net::ERR_TIMED_OUT[/QUOTE]
Sooo... anyone else having this same issue, or know what I'm doing wrong?
You're gonna have to config your server to use wss, what server are ya running?
[QUOTE=LegoGuy;49844307]You're gonna have to config your server to use wss, what server are ya running?[/QUOTE] Using the default Windows server, but running on Ubuntu with Wine
[QUOTE=iScripters;49846178]Using the default Windows server, but running on Ubuntu with Wine[/QUOTE] erm, I'm talkin' about the webserver
[QUOTE=LegoGuy;49849433]erm, I'm talkin' about the webserver[/QUOTE] Oh lol, sorry.. :D Server version: Apache/2.4.7 (Ubuntu)
Until rust server handles wss you might want to try [URL="https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html"]mod_proxy_wstunnel[/URL] to tunnel SSL websocket onto your local unsecure websocket. Why are you still using wine btw?
[QUOTE=H3bus;49851007]Until rust server handles wss you might want to try [URL="https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html"]mod_proxy_wstunnel[/URL] to tunnel SSL websocket onto your local unsecure websocket. Why are you still using wine btw?[/QUOTE] Thanks for the link, did some research myself too and came across it but thought I needed something else :D As for using wine.. my server is a 10-slot server for testing purpose only (debugging plugins, and websocket client) so wine will do just fine for now :) If I'm going to host a 'real' server for others to play on, it will be the native Linux server.
Sorry, you need to Log In to post a reply to this thread.