mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 20:16:14 -05:00
[httpd] Implement "trusted_networks" option
Some clients aren't really capable of authenticating + some users probably don't want to enter a password for the web interface. This option allows clients on for instance the local network to connect without authentication.
This commit is contained in:
@@ -284,7 +284,7 @@ rsp_request_authorize(struct httpd_request *hreq)
|
||||
char *passwd;
|
||||
int ret;
|
||||
|
||||
if (cfg_getbool(cfg_getsec(cfg, "general"), "promiscuous_mode"))
|
||||
if (httpd_peer_is_trusted(hreq->req))
|
||||
return 0;
|
||||
|
||||
passwd = cfg_getstr(cfg_getsec(cfg, "library"), "password");
|
||||
|
||||
Reference in New Issue
Block a user