-
Notifications
You must be signed in to change notification settings - Fork 194
Droppy is not working on safari #248
Comments
Just guessing: Are you correctly proxying WebSockets through your nginx? proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; https://github.com/silverwind/droppy/wiki/Nginx-reverse-proxy |
Oh Just saw your reply, I will have a try now. |
My nginx setting (partial):
|
Hmm, that's pretty strange. Does the demo work? What Safari version? |
Also, try https://www.websocket.org/echo.html using secure WebSocket. |
Oh, and for an explanation on the 401 response on the WebSocket request: This response is given when no cookie is sent. Maybe you're blocking cookies, or something else is making the cookie go missing. I think I'll fix that by removing cookie usage when in public mode, they're not really necessary unless authentication is enabled. |
Thanks a lot for your reply! @silverwind My browser supports websocket, and seems demo does not work well. The menu is not rendered, and when I click the folder, it becomes black. |
Safari Version 8.0.8 (10600.8.9) |
And I don't think my settings are blocking cookies, as far as I know. On the other hand, chrome and firefox have no issues. |
Tried 'always allow', still same issue. |
Luckily, I have a test page for this exact issue. Could you post the content of this site? |
Sure, my safari:
|
From the nginx log. I see those 401 for ws requests from safari. So I guess it is blocked by nginx's basicauth check, because the browser is not sending the authorization header. Not sure if this is a browser bug or client code can workaround this. |
Well, now I think this is a safari issue because it is not passing credential in wss request. Is wss a must for droppy, can this be turned off? |
Ah, so the 401 is from nginx instead of droppy, that explains it. Other browser are probably sending basic auth data on the Websocket Update request, while Safari likely doesn't. I'll read up more/test this, but it sounds like a browser bug to me.
When the server is on https, it's forced to be wss. |
Actually I mean: does droppy have a non-websocket mode? I that mode, it does polling to get information from server? |
Ah, no. Unfortunately WebSocket is a must right now, but I'll think about adding a polling fallback. |
Thanks a lot for your support! Sorry for the false alarm. I am closing this and will try to use droppy's account system instead. Thanks again! |
No problem! I just verified the issue is present in Safari 9 too, so I guess it's bug report time :) |
@raybellis I do not see any issues regarding websocket authentication on Safari 12.0, what are you exactly experiencing? The only websocket-related bug in Safari that I'm aware of is that it won't work with self-signed SSL certificates. |
I'm not using droppy, but found this github issue when searching for related help so dropped the link above for your reference. In short, if you have a websocket and http on the same domain and port, Safari doesn't pass the credentials used for the HTTP request when subsequently talking to the websocket, so the proxy always returns 401. |
Interesting, thanks. Maybe I'll switch to in-line authentication on the Websocket to avoid it. |
The web UI cannot render correctly. Tested on iOS and OSX.
The text was updated successfully, but these errors were encountered: