* try to finalize API token protection
This commit is contained in:
lumapu 2024-02-09 00:25:25 +01:00
parent 15349520d2
commit 8b2db4abfa
6 changed files with 39 additions and 49 deletions

View file

@ -227,7 +227,7 @@ class Web {
}
void checkProtection(AsyncWebServerRequest *request) {
if(mApp->isProtected(request->client()->remoteIP().toString().c_str())) {
if(mApp->isProtected(request->client()->remoteIP().toString().c_str(), true)) {
checkRedirect(request);
return;
}
@ -314,7 +314,7 @@ class Web {
if (request->args() > 0) {
if (String(request->arg("pwd")) == String(mConfig->sys.adminPwd)) {
mApp->unlock(request->client()->remoteIP().toString().c_str());
mApp->unlock(request->client()->remoteIP().toString().c_str(), true);
request->redirect("/");
}
}