Add webserver cpal support

This commit is contained in:
Blaz Kristan 2023-04-14 17:21:07 +02:00
parent 3efee4a855
commit 396ea3d0ee

View File

@ -9,6 +9,7 @@
#ifdef WLED_ENABLE_PIXART #ifdef WLED_ENABLE_PIXART
#include "html_pixart.h" #include "html_pixart.h"
#endif #endif
#include "html_cpal.h"
/* /*
* Integrated HTTP web server page declarations * Integrated HTTP web server page declarations
@ -361,6 +362,15 @@ void initServer()
}); });
#endif #endif
server.on("/cpal.htm", HTTP_GET, [](AsyncWebServerRequest *request){
if (handleFileRead(request, "/cpal.htm")) return;
if (handleIfNoneMatchCacheHeader(request)) return;
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_cpal, PAGE_cpal_L);
response->addHeader(FPSTR(s_content_enc),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
});
#ifdef WLED_ENABLE_WEBSOCKETS #ifdef WLED_ENABLE_WEBSOCKETS
server.addHandler(&ws); server.addHandler(&ws);
#endif #endif