{"action":"created","issue":{"url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/240","labels_url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/240/comments","events_url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/240/events","html_url":"https://github.com/woutervanwijk/Pi-MusicBox/issues/240","id":59609531,"number":240,"title":"static_dir configuration parameter overridden by other extensions","user":{"login":"jcass77","id":10268911,"avatar_url":"https://avatars.githubusercontent.com/u/10268911?v=3","gravatar_id":"","url":"https://api.github.com/users/jcass77","html_url":"https://github.com/jcass77","followers_url":"https://api.github.com/users/jcass77/followers","following_url":"https://api.github.com/users/jcass77/following{/other_user}","gists_url":"https://api.github.com/users/jcass77/gists{/gist_id}","starred_url":"https://api.github.com/users/jcass77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcass77/subscriptions","organizations_url":"https://api.github.com/users/jcass77/orgs","repos_url":"https://api.github.com/users/jcass77/repos","events_url":"https://api.github.com/users/jcass77/events{/privacy}","received_events_url":"https://api.github.com/users/jcass77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-03T08:24:08Z","updated_at":"2015-03-03T10:58:25Z","closed_at":null,"body":"Using the ```static_dir``` configuration parameter, as is currently being done to specify the default Mopidy webclient, does not work as intended for every scenario. See https://github.com/mopidy/mopidy/issues/860 for details.\r\n\r\nThe problem is that all extensions are served from the mopidy root folder, which means that any static content folder that shares a name with whatever extensions are installed will not be served as expected. An example of this is the https://github.com/tkem/mopidy-local-images extension which is named 'images' and clashes with the 'images' folder of the webclient.\r\n\r\nTo test this try accessing the MusicBox web client in the following ways after installing mopidy-local-images:\r\n\r\n1. http://musicbox.local -> ```static_dir``` reference is used, images folder is overridden by mopidy-local-images, and the relative URL to the default cover art in the footer (images/default_cover.png) cannot be found\r\n\r\n2. http://musicbox.local/musicbox_webclient -> standard mopidy extension configuration is used, and images are served correctly from /musicbox_webclient/images/default_cover.png\r\n\r\nUntil there is a reliable way of specifying defaults in mopidy, It is probably best to move away from using ```static_dir``` and just revert to using the URL in (2) above?\r\n\r\nNote that this issue should only become evident should we decided to merge woutervanwijk/Pi-MusicBox#234 and make mopidy-local-images part of the standard Pi MusicBox distribution."},"comment":{"url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/comments/76925268","html_url":"https://github.com/woutervanwijk/Pi-MusicBox/issues/240#issuecomment-76925268","issue_url":"https://api.github.com/repos/woutervanwijk/Pi-MusicBox/issues/240","id":76925268,"user":{"login":"kingosticks","id":934824,"avatar_url":"https://avatars.githubusercontent.com/u/934824?v=3","gravatar_id":"","url":"https://api.github.com/users/kingosticks","html_url":"https://github.com/kingosticks","followers_url":"https://api.github.com/users/kingosticks/followers","following_url":"https://api.github.com/users/kingosticks/following{/other_user}","gists_url":"https://api.github.com/users/kingosticks/gists{/gist_id}","starred_url":"https://api.github.com/users/kingosticks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingosticks/subscriptions","organizations_url":"https://api.github.com/users/kingosticks/orgs","repos_url":"https://api.github.com/users/kingosticks/repos","events_url":"https://api.github.com/users/kingosticks/events{/privacy}","received_events_url":"https://api.github.com/users/kingosticks/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T10:58:25Z","updated_at":"2015-03-03T10:58:25Z","body":"I think we currently do port redirection with IP tables but this is no good if we want URL redirection too. Is this the job for a reverse proxy? I've no experience with any of this but google shows me\r\n* Tinyproxy\r\n* Nginx\r\n* Apache with mod_proxy\r\n\r\nI suppose we just want something small and really simple so probably not Apache. I wonder if it would break any clients. Presumably musicbox-webclient is now OK thanks to https://github.com/woutervanwijk/Mopidy-MusicBox-Webclient/pull/66\r\n\r\nMaybe this would also easily allow us to password protect certain pages (i.e. the settings and system pages). Although I only know of [one request for this feature](https://discuss.mopidy.com/t/use-pi-musicbox-for-streming-a-live-radio-broadcast-stream-in-different-rooms-in-a-school/583).\r\n"}}