[aida] WebSockets behind a proxy

Phil (list) pbpublist at gmail.com
Tue May 31 21:40:47 CEST 2016


On Tue, 2016-05-31 at 11:34 +0200, Janko Mivšek wrote:
> Phil (list) je 25. 05. 2016 ob 22:29 napisal:
> 
> > 
> > I was taking a look at using WebSockets for an application but it
> > appears that Aida/Swazoo doesn't know how to deal with WebSockets
> > from
> > behind a proxy without a bit of work (i.e. where the connection has
> > been pre-upgraded by Apache.)  I was wondering if there are any
> > pointers as to how to best handle this scenario?
> It is supposed that a proxy server deals with proxying WebSocket 
> requests, AFAIK. So far my real-time apps are on intranets, so I
> didn't 
> yet have this case to know more about.
> 

Janko,

Thanks for your reply and it's understandable that this may not be a
common use case.  You are correct that the proxy server deals with the
WebSockets which is a problem for Swazoo/Aida since it uses the upgrade
request to determine which requests are WebSockets. (i.e. since the
upgrade request is never seen behind a proxy, the connection is never
upgraded as far as Swazoo is concerned so it also doesn't hold it open
and all Aida sees are regular HTTP requests coming in which it doesn't
handle properly and on the client side the WebSocket fails)  Based on
some preliminary looking into this, it appears that what I need to do
is migrate the #behindProxy method to Swazoo and reconfigure things a
bit at the connection/request level to handle this scenario.

Thanks,
Phil

> Best regards
> Janko
> 
> 
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida


More information about the Aida mailing list