diff --git a/WebCfgServer.cpp b/WebCfgServer.cpp
index ac258e9..2835989 100644
--- a/WebCfgServer.cpp
+++ b/WebCfgServer.cpp
@@ -112,6 +112,25 @@ void WebCfgServer::initialize()
waitAndProcess(false, 1000);
}
});
+ _server.on("/ota", [&]() {
+ if (_hasCredentials && !_server.authenticate(_credUser, _credPassword)) {
+ return _server.requestAuthentication();
+ }
+ String response = "";
+ buildOtaHtml(response);
+ _server.send(200, "text/html", response);
+ });
+ _server.on("/uploadota", HTTP_POST, [&]() {
+ if (_hasCredentials && !_server.authenticate(_credUser, _credPassword)) {
+ return _server.requestAuthentication();
+ }
+
+ String response = "ok";
+
+ _server.send(200, "text/html", response);
+ }, [&]() {
+ handleOtaUpload();
+ });
_server.begin();
}
@@ -351,6 +370,11 @@ void WebCfgServer::buildHtml(String& response)
response.concat("");
response.concat("");
+ response.concat("