[httpd] Add promiscuous mode option, i.e. no auth requirements

For people who want to avoid the web login, or want to get around pairing
problems. This is also added because commit #e59a1a1 means that all
Remotes are now subject to auth, not just those with a user-agent name that
starts with "Remote".
This commit is contained in:
ejurgensen
2017-10-29 00:05:20 +02:00
parent 8e7c47cce9
commit eff9e6ebeb
6 changed files with 26 additions and 9 deletions

View File

@@ -853,7 +853,7 @@ rsp_request(struct evhttp_request *req)
/* Check authentication */
lib = cfg_getsec(cfg, "library");
passwd = cfg_getstr(lib, "password");
if (passwd)
if (passwd && !cfg_getbool(cfg_getsec(cfg, "general"), "promiscuous_mode"))
{
libname = cfg_getstr(lib, "name");