Allow disabling OTA for web_server while keeping it enabled for captive_portal (#9583)

This commit is contained in:
J. Nick Koston authored and Jesse Hills committed 2025-07-17 19:39:39 +12:00
1 parent 08a5ba6ef1
commit 9d80889bc9
5 files changed
+46 -20

No files matched your search

+3 -3
View File
@@ -268,10 +268,10 @@ std::string WebServer::get_config_json() {
return json::build_json([this](JsonObject root) {
root["title"] = App.get_friendly_name().empty() ? App.get_name() : App.get_friendly_name();
root["comment"] = App.get_comment();
#ifdef USE_WEBSERVER_OTA
root["ota"] = true; // web_server OTA platform is configured
#if defined(USE_WEBSERVER_OTA_DISABLED) || !defined(USE_WEBSERVER_OTA)
root["ota"] = false; // Note: USE_WEBSERVER_OTA_DISABLED only affects web_server, not captive_portal
#else
root["ota"] = false;
root["ota"] = true;
#endif
root["log"] = this->expose_log_;
root["lang"] = "en";