[WEBUI] Add Favicon.ico (#1703)

* Add Favicon.ico to the WebUI

* Update config_WebContent.h

* Update ZwebUI.ino
This commit is contained in:
Northern Man authored and GitHub committed 2023-07-10 04:13:38 -05:00
1 parent b10c96ee32
commit 954e077d05
2 files changed
+113

No files matched your search

+11
View File
@@ -1056,6 +1056,16 @@ void handleIN() {
}
}
/**
* @brief /handleFavicon - Send Favicon
*
*/
void handleFavicon() {
WEBUI_TRACE_LOG(F("handleCN: uri: %s, args: %d, method: %d" CR), server.uri(), server.args(), server.method());
server.sendHeader("Content-Type", "image/x-icon");
server.send_P(200, "image/x-icon", reinterpret_cast<const char*>(Openmqttgateway_logo_mini_ico), sizeof(Openmqttgateway_logo_mini_ico));
}
# if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE)
/**
* @brief /UP - Firmware Upgrade Page
@@ -1273,6 +1283,7 @@ void WebUISetup() {
server.on("/lo", handleLO); // Configure Logging
server.on("/rt", handleRT); // Reset configuration ( Erase and Restart )
server.on("/favicon.ico", handleFavicon); // Information
server.begin();
Log.begin(LOG_LEVEL, &WebLog);