Included changes from original repository

This commit is contained in:
BPoH_Voodoo
2018-05-16 21:03:44 +02:00
parent afc9272aae
commit 00f6ab5b58
6 changed files with 165 additions and 27 deletions
+2
View File
@@ -69,6 +69,7 @@ bool handleFileRead(String path) {
if (SPIFFS.exists(pathWithGz))
path += ".gz";
File file = SPIFFS.open(path, "r");
server.sendHeader("Access-Control-Allow-Origin", "*");
size_t sent = server.streamFile(file, contentType);
file.close();
return true;
@@ -153,5 +154,6 @@ void handleFileList() {
}
output += "]";
server.sendHeader("Access-Control-Allow-Origin", "*");
server.send(200, "text/json", output);
}