gzip works from FS
This commit is contained in:
+8
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user