mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-22 02:35:29 +00:00
Disable web security if AP mode is triggered
This commit is contained in:
parent
5f14517258
commit
4b9cb27e58
@ -87,7 +87,7 @@ void AmsWebServer::setJson(StaticJsonDocument<500> json) {
|
||||
}
|
||||
|
||||
bool AmsWebServer::checkSecurity(byte level) {
|
||||
bool access = !config->hasConfig() || config->authSecurity < level;
|
||||
bool access = WiFi.getMode() == WIFI_AP || !config->hasConfig() || config->authSecurity < level;
|
||||
if(!access && config->authSecurity >= level && server.hasHeader("Authorization")) {
|
||||
println(" forcing web security");
|
||||
String expectedAuth = String(config->authUser) + ":" + String(config->authPass);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user