gzip works from FS

This commit is contained in:
Simon Schmidt
2021-06-23 02:13:48 +02:00
parent 6596346d3d
commit 642ee7d0a6
9 changed files with 203 additions and 6 deletions
+8 -5
View File
@@ -84,12 +84,15 @@ void handleNotFound() {
void setup_webserver() {
server.on("/", handleRootGz);
server.on("/style.css", handleCssGz);
server.on("/favicon.png", handleFaviconGz);
// server.on("/", handleRootGz);
// server.on("/style.css", handleCssGz);
// server.on("/favicon.png", handleFaviconGz);
// void serveStatic(const char* uri, fs::FS& fs, const char* path, const char* cache_header = NULL );
server.serveStatic("/static", LittleFS, "/tt.html");
server.serveStatic("/static", LittleFS, "/tt.html.gzip");
server.serveStatic("/http", LittleFS, "/http/");
server.serveStatic("/http", LittleFS, "/http/");
server.serveStatic("/http", LittleFS, "/http/");
server.onNotFound(handleNotFound);
@@ -178,7 +181,7 @@ void setup() {
mount_fs();
//format_fs();
ls("/");
ls("tester/");
ls("http/");
// readFile("/test.txt");
pinMode(NODEMCU_LED, OUTPUT);