diff --git a/ESPMegaPRO-firmware/lib/ESPMegaPRO/ESPMegaWebServer.cpp b/ESPMegaPRO-firmware/lib/ESPMegaPRO/ESPMegaWebServer.cpp index b438ad2..76f7630 100644 --- a/ESPMegaPRO-firmware/lib/ESPMegaPRO/ESPMegaWebServer.cpp +++ b/ESPMegaPRO-firmware/lib/ESPMegaPRO/ESPMegaWebServer.cpp @@ -106,6 +106,7 @@ void ESPMegaWebServer::setWebPassword(const char* password) void ESPMegaWebServer::dashboardHandler(AsyncWebServerRequest *request) { + request->authenticate(this->webUsername, this->webPassword); auto bindedDashboardProcessor = std::bind(&ESPMegaWebServer::dashboardProcessor, this, std::placeholders::_1); request->send_P(200, "text/html", ota_html, bindedDashboardProcessor); } @@ -150,6 +151,7 @@ String ESPMegaWebServer::dashboardProcessor(const String &var) void ESPMegaWebServer::configHandler(AsyncWebServerRequest *request) { + request->authenticate(this->webUsername, this->webPassword); auto bindedConfigProcessor = std::bind(&ESPMegaWebServer::configProcessor, this, std::placeholders::_1); request->send_P(200, "text/html", config_html, bindedConfigProcessor); }