OTA security added

This commit is contained in:
richonguzman 2023-08-28 22:08:00 -04:00
parent 310b3afe59
commit a396c3a9bf
4 changed files with 25 additions and 5 deletions

View file

@ -276,7 +276,11 @@ void startOTAServer() {
request->send(SPIFFS, "/index2.html", "text/html");
});
AsyncElegantOTA.begin(&server);
if (Config.ota.username != "" && Config.ota.password != "") {
AsyncElegantOTA.begin(&server, Config.ota.username.c_str(), Config.ota.password.c_str());
} else {
AsyncElegantOTA.begin(&server);
}
server.begin();
Serial.println("init : OTA Server ... done!");
}