devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 189 forks source link

Wrong landing page after logout #652

Closed Tjelfe closed 7 years ago

Tjelfe commented 7 years ago

When using a non-root location (i.e. www.myserver.com/cherrymusic) logout doesn't lead back to the cherrymusic login page but to the root adress www.myserver.com.

tilboerner commented 7 years ago

@devsnd Could you please check out the above commit in devel? It's tiny, but it's client code, and it's been a while... 🐌

devsnd commented 7 years ago

Looks good to me. Does window.location.host always end in a slash or does this depend on whether there is a slash in the address bar? And also, you should also commit the compiled and minified js so that everybody using devel gets the patch. You need to execute devscripts/deploy.py to do so if I remember correctly.

tilboerner commented 7 years ago

Does window.location.host always end in a slash

No, it actually should not end in a slash: that's already part of the URL's path. The code only cuts off potential leading slashes from the configured root path, so a guaranteed slash can be added without creating a duplicate. I'll add a comment there to make that clear.

you should also commit the compiled and minified js

Right. Thanks for the reminder!