20 #include "../../../include/esp3d_config.h"
21 #if defined (HTTP_FEATURE)
22 #include "../http_server.h"
24 #include "../embedded.h"
25 #if defined (ARDUINO_ARCH_ESP32)
26 #include <WebServer.h>
27 #endif //ARDUINO_ARCH_ESP32
28 #if defined (ARDUINO_ARCH_ESP8266)
29 #include <ESP8266WebServer.h>
30 #endif //ARDUINO_ARCH_ESP8266
31 #include "../../filesystem/esp_filesystem.h"
33 void HTTP_Server::handle_root()
35 String path =
"/index.html";
36 String contentType = getContentType(path.c_str());
37 String pathWithGz = path +
".gz";
41 _webserver->sendHeader(
"Content-Encoding",
"gzip");
44 if(!StreamFSFile(path.c_str(),contentType.c_str())) {
45 log_esp3d(
"Stream `%s` failed", path.c_str());
50 _webserver->sendHeader(
"Content-Encoding",
"gzip");