-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed issue #21 #22
fixed issue #21 #22
Conversation
Thanks, how does this PR compare to #20? |
Switching to WSS when calling the page via HTTPS is already possible by changing I think the change in config.ts would be the cleanest solution to this problem (as #22 introduces the same breaking change and as of now, breaks snapstream), I guess it's @badaix' choice if introducing that breaking change would be acceptable. |
Sorry I haven't checked the existing PR before doing this one :-/ I'll rebase using develop branch. #20 fix this problem but I just feel like it's not convenient to setup the UI like this. First, IMHO you don't want to setup a websocket url, you'd prefer to setup the service url (eg: http://mysnapcast.local). Secondly, I don't see a lot of case where you would want to setup a seperate websocket url from the web url. And in this case you would probably run into cors issues which would be annoying. So I think your service should provide have a standalone web ui that could work without any external configuration and this should be feasable. For example we can infer websocket parameters like this:
With somehting like this we wouldn't need any extra config.js |
My changes that introduce config.ts/js are already in develop and master. The only thing thing required to get the behaviour you're proposing is to change baseUrl to The 1% of edge cases (namely, hosting snapweb under a different path, port or server than snapserver, which might be useful for snapweb development) can be handled by editing config.js manually. Also keep in mind that CORS policies do not apply to websockets, so it is possible to run snapweb on server1 and point the websocket to server2 without any issues (I doubt anyone does that outside of development though, to be honest). I think changing config.ts to infer the URL by default is a cleaner solution than a SnapWebConfig that isn't actually configurable. In 99% of cases my proposed fix Just Works™ and even the remaining 1% can be handled by manually editing a single seperate file, which has the advantage that snapweb can still be upgraded without breaking anything. |
As you wish |
boths solutions sound good to me, thanks anyway :) |
I've setup snapcast at home and I'm using it in a docker environment using traefik https reverse proxy.
With default setup the interface cannot lod because of mixed content (https with unsecure web socket)
This PR should solve the problem.
Ii tested snapcontrol in my setup but I haven't tested snapstream yet.
This should fix #21