{"action":"created","issue":{"url":"https://api.github.com/repos/restic/rest-server/issues/66","repository_url":"https://api.github.com/repos/restic/rest-server","labels_url":"https://api.github.com/repos/restic/rest-server/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/restic/rest-server/issues/66/comments","events_url":"https://api.github.com/repos/restic/rest-server/issues/66/events","html_url":"https://github.com/restic/rest-server/issues/66","id":313875020,"number":66,"title":"Make configuration not global","user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars2.githubusercontent.com/u/1128849?v=4","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-12T20:25:40Z","updated_at":"2018-04-12T20:34:33Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm using this as a library and would like to start REST servers for different data directories. Currently, [the Config is global](https://github.com/restic/rest-server/blob/7dd5483ea3fa6611a5239fe6638f25751d6b5100/mux.go#L16) and cannot be customized per-mux.\r\n\r\nI will submit a PR for this. Do you have any design suggestions for making this change?"},"comment":{"url":"https://api.github.com/repos/restic/rest-server/issues/comments/380936018","html_url":"https://github.com/restic/rest-server/issues/66#issuecomment-380936018","issue_url":"https://api.github.com/repos/restic/rest-server/issues/66","id":380936018,"user":{"login":"rawtaz","id":825204,"avatar_url":"https://avatars0.githubusercontent.com/u/825204?v=4","gravatar_id":"","url":"https://api.github.com/users/rawtaz","html_url":"https://github.com/rawtaz","followers_url":"https://api.github.com/users/rawtaz/followers","following_url":"https://api.github.com/users/rawtaz/following{/other_user}","gists_url":"https://api.github.com/users/rawtaz/gists{/gist_id}","starred_url":"https://api.github.com/users/rawtaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawtaz/subscriptions","organizations_url":"https://api.github.com/users/rawtaz/orgs","repos_url":"https://api.github.com/users/rawtaz/repos","events_url":"https://api.github.com/users/rawtaz/events{/privacy}","received_events_url":"https://api.github.com/users/rawtaz/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T20:34:33Z","updated_at":"2018-04-12T20:34:33Z","author_association":"CONTRIBUTOR","body":"I was thinking about this today as well.\r\n\r\nI think to keep it simple you just need to be able to supply multiple `--path` arguments, one per path you want to have repositories in, each having its own `.htaccess` file. The server could simply look for the user in the first path/mux, and if it's not found there look in the next one you specified, etc.\r\n\r\nOne can start with the requirement that usernames must be unique over all paths (otherwise the first one will be used). So e.g. if user `foo` exists in both of two paths, when `/foo` is used as the path in the URL, the first path's user is used, and the data is stored there.\r\n\r\nI don't think the other arguments need to be per-path, let's keep it simple."}}
{"actor":{"display_login":"rawtaz"}}