I know that this question has been asked before (https://community.webfaction.com/questions/13027/nginx-and-websockets), but I wondered if there was any further status updates now that Nginx 1.4.4 appears to be the stable version. Is there a way to enable websockets via a .htaccess or something? If this isn't possible I know that you can select the option to "Open a port in the server firewall for the application. " when creating the application, but then I can only access the websockets through the IP:PORT and not via the URL I assign the application in the websites tab. Is there anyway to use the URL to access the application via websockets? (The reason I need this is that I need the websockets to share session data with the site which was accessed via HTTP). Thanks! asked 31 Jan '14, 17:59 tractus |
It is being researched but has not been implemented yet, there is no ETA but there has been a lot of recent activity on the internal tracking ticket, so it is being worked on. For the time being you would use JavaScript in the browser DOM and have it load the websockets via IP:PORT transparent to the user. answered 01 Feb '14, 01:55 johns Thanks for your answer! It's good to hear that it's being worked on internally. Loading the websockets via IP:PORT isn't a problem, the problem is that by doing that I don't have access to the site's cookies and session info. Do you have a suggestion of how maybe I could setup the site so I could use URL:PORT instead so I don't run into cross domain issues? Thanks again for the update!
(01 Feb '14, 19:52)
tractus
I'm not sure I understand. It sounds like what you're trying to do is to serve your entire site through the open port so that requests never hit the front-end webserver at all, but that's the wrong approach. You wouldn't serve your entire site through the open port (including HTTP) -- you'd only serve WebSockets traffic through the open port. The domain would be the same in both cases; only the port would be different (i.e. In short, the open port should be for WebSockets traffic, nothing else, so all of your cookies and session info should be acquired from the HTTP request that loaded the page initially.
(02 Feb '14, 00:06)
ryans ♦♦
Oh I get what you're saying. Don't use IP:PORT use DOMAIN:PORT! Thanks!
(02 Feb '14, 05:53)
tractus
|
Im completely noob on this, good read still. answered 02 Feb '14, 15:32 min0taur |