Browsers on iPad OS cannot connect to Phoenix LiveView through proxy

I’m using Phoenix LiveView on a web-based system, and it works fine when I access it with PC and Android browsers, but it doesn’t work when I access it with iPad OS browsers (Safari, Chrome, Firefox). It looks like the WebSocket connection is failing, rather than just the tap not responding.

On my system, Phoenix Servers are behind a Reverse Proxy (Nginx). I thought this presence was causing the problem, so I opened some ports and tried to access Phoenix Servers directly. Then, the problem was solved. I’d like to continue using Nginx if possible, but is that impossible?

I should say that this is an iPad OS issue, not a Phoenix LiveView issue per se, but if you have any ideas on how to work around this, please let me know.

I use Phoenix 1.5.3 and Phoenix LiveView 0.13.2. The version of iPad OS is 13.5.

I have found the source of the problem. It’s BASIC certification. Since this site is under development, I enabled BASIC authentication of nginx. Once I disabled it, the problem went away.

Perhaps the iPad OS browsers do not send authentication headers when connecting with WebSocket.

3 Likes