[WebUI] Added Basic Authentication (#1618)

* [WebUI] Added Basic Authentication

* Make the security option a MACRO to avoid typos in future updates
This commit is contained in:
Northern Man authored and GitHub committed 2023-04-27 16:49:09 -05:00
1 parent abeef870c7
commit acc0d91ca8
5 files changed
+148 -29

No files matched your search

+15
View File
@@ -57,8 +57,23 @@
# define WEBUI_TRACE_LOG(...)
#endif
#ifndef WEBUI_AUTH
# define WEBUI_AUTH true // Default to WebUI authentication
#endif
#ifndef WEBUI_LOGIN
# define WEBUI_LOGIN "admin"
#endif
/*------------------- End of Compiler Directives ----------------------*/
#define WEBUI_SECURE \
if (webUISecure) { \
if (!server.authenticate(www_username, ota_pass)) { \
return server.requestAuthentication(DIGEST_AUTH, gateway_name, authFailResponse); \
} \
}
#define MAX_WIFI_NETWORKS_TO_SHOW 10
/*