[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:
ejurgensen
2017-11-11 21:17:42 +01:00
parent 6d937469f5
commit 3d5aeda7aa
8 changed files with 80 additions and 42 deletions

View File

@@ -147,12 +147,15 @@ httpd_redirect_to_admin(struct evhttp_request *req);
void
httpd_redirect_to_index(struct evhttp_request *req, const char *uri);
int
httpd_basic_auth(struct evhttp_request *req, const char *user, const char *passwd, const char *realm);
bool
httpd_peer_is_trusted(struct evhttp_request *req);
bool
httpd_admin_check_auth(struct evhttp_request *req);
int
httpd_basic_auth(struct evhttp_request *req, const char *user, const char *passwd, const char *realm);
int
httpd_init(void);