Fix issue when compiling with PROGMEM_WWW flag omitted (#186)

This commit is contained in:
rjwats 2020-07-28 08:29:58 +01:00 committed by GitHub
parent 25f04c3d7f
commit 2711cb2f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,11 +54,11 @@ ESP8266React::ESP8266React(AsyncWebServer* server) :
});
#else
// Serve static resources from /www/
server->serveStatic("/js/", *fs, "/www/js/");
server->serveStatic("/css/", *fs, "/www/css/");
server->serveStatic("/fonts/", *fs, "/www/fonts/");
server->serveStatic("/app/", *fs, "/www/app/");
server->serveStatic("/favicon.ico", *fs, "/www/favicon.ico");
server->serveStatic("/js/", ESPFS, "/www/js/");
server->serveStatic("/css/", ESPFS, "/www/css/");
server->serveStatic("/fonts/", ESPFS, "/www/fonts/");
server->serveStatic("/app/", ESPFS, "/www/app/");
server->serveStatic("/favicon.ico", ESPFS, "/www/favicon.ico");
// Serving all other get requests with "/www/index.htm"
// OPTIONS get a straight up 200 response
server->onNotFound([](AsyncWebServerRequest* request) {