From 396ea3d0eeb297653ea45a01cd22d32347264a35 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Fri, 14 Apr 2023 17:21:07 +0200 Subject: [PATCH] Add webserver cpal support --- wled00/wled_server.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 58931cec..fe5e5e7c 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -9,6 +9,7 @@ #ifdef WLED_ENABLE_PIXART #include "html_pixart.h" #endif +#include "html_cpal.h" /* * Integrated HTTP web server page declarations @@ -361,6 +362,15 @@ void initServer() }); #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 server.addHandler(&ws); #endif